Click to See Complete Forum and Search --> : Question about order of selectors within declaration


EOBeav
09-15-2006, 02:27 AM
I have a paragraph with id "box", and I'd like to make the active links and visited links inside of that paragraph blue with no underline. Do I do it like this?

#box p a:link, #box p a:visited {
color:blue;
text-decoration: none;
} Am I writing that entire declaration correctly? Thanks for your help.

Kravvitz
09-15-2006, 03:56 AM
That means there is a <p> somewhere inside an element with the ID of "box".

From what you said it sounds like you want "p#box" instead of "#box p".

I suggest you read The Meaning of Semantics Take II: Naming Conventions for Class and ID in CSS (http://www.informit.com/articles/article.asp?p=170514&rl=1)

ray326
09-15-2006, 11:28 AM
http://penguin.theopalgroup.com/cgi-bin/css3explainer/selectoracle.py

EOBeav
09-15-2006, 11:30 AM
Thanks for the links...I just get those things switched around sometimes. Maybe I need to quit working on sites so late at night.