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……..
Clearfixes you can or can’t use with a menu:
/* can’t use this – you won’t see the child dropdowns as they go outside UL! */
/* pseudo clearfix element */
width: 100%; /* give any width (to trigger hasLayout in older IEs, gives the same end result) */
I find it a bit odd people keep on writing their CSS-minded elements and attributes in HTML. I mean things like this:
Personally I rather just keep it all in CSS and not add extra stuff to HTML just because I need a clearfix.