I'm sure there's a simple mistake I'm making in the css below, but I'm trying to target anchor element of the first-child of the ul element and apply formatting to it.
Can someone tell me what I'm doing wrong in the css first-child selector?
Code:<div class="footer"> <div class="menu"> <ul> <li><a href="#">First Child Link</a></li> <li><a href="#">About Us</a></li> </ul> </div> </div> .footer ul li {display:inline-block; } .footer .menu ul li a {display:block; float:left; padding:0 10px;border-left:1px solid #ccc;} .footer .menu ul li:first-child a {padding-right:0 !important; border:none !important;}



Reply With Quote




Bookmarks