[thelist] I've found a great use for <span>

aardvark roselli at earthlink.net
Thu Aug 1 09:53:00 CDT 2002


> From: "Raymond Camden" <jedimaster at macromedia.com>
>
> So in the naming syntax of
>
> foo#goo {
>
> }
>
> Everything before the # is ignored?

not quite...

if you have <td id="foo"> on one page, and <div id="foo"> on
another page, with the following CSS:

td#foo	{ foo-bar : fubar ; }

then only the <td> will have the style applied...

it's not only there for readbility, but also for specificity... sometimes
you just want to be sure an id is only applied to a particular kind of
element, or if it's misapplied, the CSS doesn't hose the element to
which it was applied...  think about colors of text and backgrounds
when you start nesting elements...

so this:
td#foo a:hover {}

will only affect anchors on hover when they are in <td>s that have
an id of 'foo'...



--
Read the evolt.org case study
Usability: The Site Speaks for Itself
http://amazon.com/exec/obidos/ASIN/1904151035/evoltorg02-20
ISBN: 1904151035



More information about the thelist mailing list