Previous Message
Next Message

Variation on "off-site" links - need help

Sent by Stuart Homfray on 12 September 2005 11:11

John Huetz wrote:
> We're developing a site content management process which separates  the 
> content from the presentation, what a novel idea. The designers  want to 
> be able to indicate within a list of links which link may be  "new" by 
> displaying a "NEW" graphic after the link text. What I'm  trying figure 
> out is how to make that happen within the style sheet  only, such that 
> the programmers only have to add a "class='new'" to  the a tag inside 
> the list item.

John, I've just had a play with this, and unfortunately, due 
circumstances beyond our control (ie IE!), the best that I could come up 
with was to add an empty <span class="new"> element:

     <li><a href="#">Class definition on a span<span 
     <li><a href="#">Class definition on a span that wraps inside the ul 
block<span class="new"></span></a></li>

CSS: {
   background: url( no-repeat 
100% 0.3em;
   padding-right: 28px;
   _display: inline-block; /* for IE6 */

I've tested in Firefox (1.0.6), Opera (8.02) and IE6 - haven't tested in 
Mac browsers.

I agree with you - if someone knows of a better technique that removes 
the need for unneccessary elements, I, too, am all ears!


css-discuss [EMAIL-REMOVED]]
List wiki/FAQ --
Supported by --
Previous Message
Next Message

Message thread:

Possibly related: