Quote:
Originally Posted by GrannyGrump
Can't you declare "u" in your css? I often do that for "em" and "strong"
u {text-decoration: underline}
|
No, you can't create new elements in CSS, you can only define the formatting for existing ones. And <u> is not an existing element in XHTML.
But you can re-define <em>, for example (if you are underlining, it is probably because you want to emphasize), or give it a class:
Code:
em {text-decoration: underline; font-style: normal}
em.u {text-decoration: underline; font-style: normal}
In the second case, you'd use <em class="u">like this</em>.