html - Selecting first-child anchor element in an ul -
this question has answer here:
hi select first-child anchor element within ul li element anchor "all" selected. code:
<header> <h2>clear thinking @ wrong moment can stifle <span>creativity.</span></h2> <ul> <li><a href="#">all</a></li> <li><a href="#">branding</a></li> <li><a href="#">digital</a></li> <li><a href="#">art</a></li> <li><a href="#">photography</a></li> <li><a href="#">print</a></li> </ul> </header> header li:first-child {} targets li item not text in anchor.
header li a:first-child {} seems target anchor elements. help?
try header ul li:first-child {}
Comments
Post a Comment