As Marc said, you should use a <span>, not a <div>. If you use a <div>, you will likely make invalid code.
As a general rule, don't put block-level elements (such as <div>) inside inline elements (such as <a>). See this
W3C explanation:
Quote:
Content model
Generally, block-level elements may contain inline elements and other block-level elements. Generally, inline elements may contain only data and other inline elements. Inherent in this structural distinction is the idea that block elements create "larger" structures than inline elements.
|
You can have the
appearance of a <div> by using the
CSS:
Code:
span.block { display: block; }
This trick is commonly applied to <a> elements in navbars.