treehouse : what would you like to learn today?
Web Design Web Development iOS Development

-webkit-border-radius & background-color

  • I'm trying to set a background-color to a footer while maintaining rounded corners in Safari(-webkit-border-radius).

    Here's the HTML:
    	
    <div id=\"footer\">
    <ul>
    <li>Lorem ipsum dolor.</li>
    <li>Aliquam tincidunt.</li>
    <li>Vestibulum auctor.</li>
    </ul>
    </div>


    Here's the CSS:

    #footer {
    width: 720px;
    height: 40px;
    background-color: #f9faef;
    -moz-border-radius: 0 0 10px 10px;
    -webkit-border-radius: 0 0 10px 10px;
    text-align: center;
    color: #300;
    border-top: 1px solid #eee;
    }

    #footer li{
    padding: 20px;
    display: inline;
    }
    #footer ul {
    padding-top: 10px;
    }


    <!--This is not an issue with FireFox (-moz-border-radius)-->
  • You've got to set them separately in Webkit, I believe:


    -webkit-border-bottom-left-radius: 10px;
    -webkit-border-bottom-right-radius: 10px;