Sign In/My Account | View Cart  
advertisement

Article:
 CSS 3 Selectors
Subject: Still no way to move backward?
Date: 2005-12-27 21:57:09
From: bwucke

#field:focus + #mark1 {display: none;}
#field:focus + #mark1 + mark2 {display: block;}


all nice. The pics change if I enter the entry field.


#link:hover:first-child{
background-image: url('excl.png');
}
Cool. The image inside the link changes when hovered over.


But if I wanted to change borders around a table containing my #field? Or place a rollover image before the #link ? Still no :parent or '-' (previous sibling) selectors?


Previous Message Previous Message   Next Message No Next Message


Titles Only Titles Only Newest First
  • Still no way to move backward?
    2007-05-27 13:28:58 Romes

    Hehe... strange. I was going to mention this *exact* same thing.


    Why the heck does nobody consider whether I want to select parents?! It's all children and siblings... or as Carl Sagan would put it, "turtles all the way down".


    It wouldn't be hard, I think the clearest way to implement the syntax would be something like:


    ul li {ul} li ul li
    OR
    ul li ul {li ul li}


    Everything after the {ul} OR everything in the {...} is treated like a predicate, plain and simple.


Sponsored By: