Home › Forums › CSS › So I ran some of my code through W3C’s validator…….. › Re: So I ran some of my code through W3C’s validator……..
March 9, 2013 at 7:01 am
#127588
Participant
CrocoDillon is correct, a block level is allowed inside an anchor in html5, but I have a feeling you don’t even need it. You can make an element (like an anchor) display block and apply a background to it without failing validation. In other doctypes you probably want to use a span instead of a div.
Didn’t fully understand b), but I’m guessing you used some element inside the ul to clear the floating li – you can’t. li is the only child allowed in ul and ol. Why not use overflow: hidden or .clearfix on the ul (or simply give it a height) instead?