- From: Matthew Millar <mattmill30@hotmail.com>
- Date: Sun, 12 Sep 2010 01:03:52 +0100
- To: <www-style@w3.org>
Received on Sunday, 12 September 2010 00:04:25 UTC
Hi, I'm trying to streamline my code and I've found a few areas where i'm defining classes etc, where I can probably get away with using CSS logic. However, i'm stuck on how to give a parent element certain css styles if its child element has a particular attribute. Example: <ol> <li><a href="somewhere.html">Somewhere Else</a></li> <li><a href="#">Current Page</a></li> </ol> I want to apply a background-color to the li with a child anchor element who has the attribute href="#". I noticed on CSS 3 selectors and undefined (Blank) :contains selector and i'm not sure if this is what i'm looking for. http://www.w3.org/TR/css3-selectors/#content-selectors Thanks in advance for any help, Matthew Millar
Received on Sunday, 12 September 2010 00:04:25 UTC