W3C home > Mailing lists > Public > www-style@w3.org > November 2001

Re: How to select anonymous elements

From: fantasai <fantasai@escape.com>
Date: Sat, 10 Nov 2001 02:20:18 -0500
Message-ID: <3BECD532.37AF3F15@escape.com>
To: www-style@w3.org
Tim Phipps wrote:
> i.e. I'm trying to get hypertext links to have a solid background but
> not if they have pictures (it spoils all those lovely anti-alias buttons
> that web designers love).
> I did think of using:
> A:Link { Background: Blue; Color Yellow; }
> A:Contains(Img) { Background: Transparent; }

:contains() takes a string as a parameter, not an element (it
looks at the element's textual content). What you're looking for
is the ability to select the parent element, which was taken out
of the CSS3 Selectors module by the last working draft. (IIRC,
the argument was performance problems... I wonder, though--
wouldn't :contains() have the same problem?)

BTW, if you're selecting links, you don't need the A--just :link
will do.

CSS3 Selectors Last Call Working Draft:
Received on Saturday, 10 November 2001 02:17:40 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:59 UTC