Previous Message
Next Message

selectors question

Sent by Alastair Campbell on 17 May 2005 13:01


Hi,

Although not mainstream yet, I'm starting to add CSS2/3 selectors to a 
site for a specific purpose: identifying link types.

For example, for pdf files, I add a small icon to the right of the link 
with: a[href$=".pdf"]
And for email links: a[href^="mailto"]
(ukwindsurfing.com is the example, standards aware browser needed to see 
the effect.)

But I'm having less success with identifying external links. I can 
easily target external links with: a[href^="/outbound.php"]

(My outbound links go through a little server script, using "http:" 
would work for most people.)

What I can't do is remove them for image links, which appear quite 
strange e.g the first image in the content of:
http://ukwindsurfing.com/news/2005/0511_wojtek-brzozowski-dominates-1st-euro-cup/

I thought that using E:not or E:empty might work (see 
http://www.w3.org/TR/css3-selectors/#selectors)

However, it seems that the text in the link doesn't count as an HTML 
element, but it isn't empty either...

What I need is something that says "Apply X to link elements that do not 
contain an image", but CSS selectors are fairly one way, going down the 
DOM. As text doesn't count as an element, I'm fairly stuck.

Any ideas? I'm hoping I've just missed something obvious...

Cheers,

-Alastair
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Possibly related: