I'm trying to use the W3C Markup Validator to validate my HTML and I'm getting some errors:
Apparently I'm not allowed to put a block-level element, like div or table, inside an inline element, like span, or a. I tried moving the div tags to the outside of the link tag, but then it breaks my navigation links. It's supposed to look like this:

When I move the div outside the link tag it looks like this:

What can I do to fix this? I want the site to validate, but I want it to look good too.
Code:
document type does not allow element "div" here; missing one of "button", "map", "object", "ins", "del", "noscript" start-tag … <li ><a href="/" title=""><div>Home</div></a></li>

When I move the div outside the link tag it looks like this:

What can I do to fix this? I want the site to validate, but I want it to look good too.
Comment