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

How to select anonymous elements

From: Tim Phipps <Tim.Phipps@st.com>
Date: Wed, 7 Nov 2001 10:54:10 -0500 (EST)
Message-ID: <3BE95631.4050908@bristol.st.com>
To: www-style@w3.org
Hi stylists,
	Is there a way to specify anonymous elements? * doesn't match. My user 
style sheets has this:

   A:Link * {
     Background: Blue;
     Color: Yellow;
     Border-Color: Yellow;
     Text-Decoration: None;
   A Img, A:Link Img {
     Background: Transparent!Important;

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; }

but since I haven't found a browser that does :contains() I can't try it.

A:Link { Background: Blue; Color: Yellow; }
A:Link Img { Background: Transparent; }
doesn't give the desired effect since the Img is a child of the <A> and 
it's blue background shines through the transparent parts of the Img.

Received on Thursday, 8 November 2001 13:33:54 UTC

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