Zane
2011-08-03 10:55:09 UTC
How come with the " p#footer " the selector "p" is on the outside of the id tag?
And with the other "#footer p" the selector "p" is on the inside of the id tag?
Whats the difference?
--------------------------------------…
p#footer {
font-family: "Trebuchet MS", sans-serif;
font-size: .75em;
color: #fff;
text-align: center;
}
#footer p {
font-family: "Trebuchet MS", sans-serif;
font-size: .75em;
color: #fff;
text-align: center;
}
--------------------------------------…
I know what CSS is and I know that in both cases the selectors are being referenced so that they can be styled. But when I see selectors in css positioned in these ways it seems to always confuse me for some reason. When do selectors go on the inside/outside of id tags?