Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

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……..

#127588
wolfcry911
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?