> a span.l { display: none; } > a:hover span.s { display: none; } > a:hover span.l { display: inline; }
This will also make sure that users of assistive technology will never get the extra information, which might be a desired output. > <div class="vnav"> > <ul> > <li> > <a href="index.php"> > <span class='s'><b>::</b> Home</span> > <span class='l'> > <span class="ltxt"><b>::</b> Home</span> > <span class="rtxt">Quality - Integrity - Responsiveness</span> > </span> > </a> > </li> > </ul> > </div> This on the other hand will read "COLON COLON Home" which might not be a desired impression to give. Can we please stop treating HTML as CSS's servant? And while we're at it, can we stop painting with HTML? B elements have no semantic value and colons in text have a purpose and are not a replacement for an image. Without any CSS or a different CSS than the one applied this markup results in a link called ":: Home :: HomeQuality - Integrity - Responsiveness" which is actually rather ironic. You simply cannot expect all users to see your site and they HAVE to rely on your HTML and your text! Everybody is bitching about web sites that need JavaScript to make sense, but web sites that don't make much sense without CSS are not a bit better. If you want fancy rollover text that extends the normal link text, there is a perfectly valid HTML attribute for that: title. <a href="index.html" title="Businesses Support the Arts">Businesses</a> If you consider the hover tooltip browsers generate from title attributes too boring, use some JavaScript to spice it up: http://developer.yahoo.com/yui/examples/container/tooltip.html http://developer.yahoo.com/yui/container/tooltip/index.html I always thought going from tables and fonts to CSS is a step away from tagsoup towards clean and maintainable sites. The belief that all CSS solutions for behaviour are superior to JavaScript for these fancy add-ons seems to lead to more and more examples that throws us back to 1999 in terms of HTML quality. There are JavaScripts out there that help you achieve all this, keep the look and feel in CSS classes that get applied and work with semantically valuable HTML instead of requiring a lot of extra and nonsensical elements. In a lot of cases the functionality that comes out of it will also be more accessible, as you can test for keyboard access in JavaScript and you can check if a popup fits on the screen without causing scrollbars, something you can't do in CSS. Sorry if that came across as a rant and maybe off-topic but I do get the feeling we are running in circles. ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/