in reply to Re: (OT) CSS Codes
in thread (OT) CSS Codes

Redefining span this way makes about as much sense as redefining (just to get a little perl into this) print to mean foreach.

<span> has a legitimate use -- to make a part of a markup element different from the rest. For example:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http:/ +/www.w3.org/TR/html4/loose.dtd"> <html> <head> <style type="text/css"> span { color: red; } blockquote{ margin-left: 6em; margin-right: 8em; font-style: italic } .red { color: red; background-color:transparent; } .b { font-weight: bold; color: green; background-color:#dddddd; } .black { color: black; background-color: #aaaaff; width: 8em; max-width:8em; text-align:center; } foobar { color: blue; background-color: transparent; font-size: 1.8em; font-style: italic; } .foobar { color: blue; background-color: red; font-size: 1.8em; font-style: italic; } </style> <title>My title</title> </head> <body> <p><span>this should be red... and it is, because browsers will genera +lly allow this abuse.</span> But a decent validator (CSS specific or +html/css) will tell you something like this:</p> <blockquote>The &quot;span&quot; tag has no attributes. Attributes are + normally used with the &quot;span&quot; element to provide functiona +lity.</blockquote> <p>Normal text. <span>red text</span> and back to normal.</p> <p><span class="b">And this bold, green and with a grey background.</s +pan></p> <p class="black">Black</p> <p class="span">Red? Not today! <foobar> ...because span is NOT a clas +s.</foobar> However, turning again to our validator:</p> <blockquote>The &quot;foobar&quot; is not a recognized element in this + selector. Is it misspelled?</blockquote> <p>Well, no, but while it works, there's no guarantee that it will tom +orrow ... or even today, in some browsers.</p> <p>dot_foobar (or even id foobar) would be a valid selector... used li +ke this: <span class="foobar">text rendered as spec'ed by dot_foobar< +/span></p> </body> </html>

So if you're going to give advice on css, please do so with good advice; that is, with a decent respect for standards.