You are not logged in.
Pages: 1
I know this isn't probably the right place for this question, but I rather post this small question here then a whole separate html/css forum. :$
I've been sorta experimenting with css and I want my list to be horizontal, and a different color, and have padding.
#nav ul, li, a {
text-decoration:none;
list-style:none;
display:inline;
text-transform: uppercase;
color: #BBDBFF;
font-family:Arial;
font-size:25px;
padding:5px;
}
I want ul, li, and a to have that style ONLY in nav. The code above works, but it also makes every other list on the page like that (so my sidebar links have that sort of style).
sidebar links:
#sidebar a {
text-decoration:none;
font-family:Arial;
color:#BBDBFF;
font-size:12px;
}
How can I apply the styles only to one div (#nav)?
Last edited by Draucia (2011-08-31 10:59:58)
Offline
You're looking for this:
#nav ul,
#nav li,
#nav a {
...
}
"#nav ul, li, a" is parsed as "#nav ul" OR "li" OR "a".
Offline
Thanks a lot tavianator. Solved my problem.
Offline
Pages: 1