Jump to content

Making custome text tags for CSS - a bad idea?


Recommended Posts

It's a bad idea if you want your pages to validate. And if you're using a Strict DTD, it is possible that IE will get upset and drop into quirksmode, which will spoil your design. (Actually the thing you're discussing should have been possible with XHTML, but that hasn't happened.)It sounds like you're doing what the <span> element was designed for.I don't know if it will help or not, but are you aware that you can use more than one class name in an element's class attribute? This makes it possible to combine style properties very efficiently. Example:CSS

.red {	color:#f00;}.bold {   font-weight:bold;}


This text prints <span class="red">RED</span>.This text prints <span class="bold">BOLD</span>.This text prints <span class="bold red">BOLD AND RED</span>.

Edited by Deirdre's Dad
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...