milleplatea00
10-11-2011, 10:10 PM
I'm very very new to CSS, and am doing my best to figure things out without resorting to message boards, but this has me stumped. I'm dissecting some code from a site I really like, but I can't figure out why the selectors are used
the way they are. In particular, I can't figure out why "#header nav ul" is defined twice (the first two clauses), and why "#header nav," is written on its own before it's defined. Any help would be hugely appreciated! Here's the code (it's used for the header, obviously):
#header nav,
#header nav ul {
width: 240px;
float: left;
}
#header nav ul {
margin:0 0 10px;
}
#header nav ul li {
width: 120px;
height: 32px;
border-bottom: 1px solid #eaeaea;
float: left;
margin: 0;
padding: 0;
position: relative;
font-family: "QuicksandBold", "Helvetica Neue", Arial, Helvetica, sans-serif;
}
#header nav ul li a {
color: #fff;
display:block;
height:32px;
position:relative;
text-transform:uppercase;
width:120px;
font-size: 11px;
}
#header nav ul li a span {
color: #333;
display:block;
line-height:12px;
height: 10px;
position:relative;
top:10px;
width:110px;
}
the way they are. In particular, I can't figure out why "#header nav ul" is defined twice (the first two clauses), and why "#header nav," is written on its own before it's defined. Any help would be hugely appreciated! Here's the code (it's used for the header, obviously):
#header nav,
#header nav ul {
width: 240px;
float: left;
}
#header nav ul {
margin:0 0 10px;
}
#header nav ul li {
width: 120px;
height: 32px;
border-bottom: 1px solid #eaeaea;
float: left;
margin: 0;
padding: 0;
position: relative;
font-family: "QuicksandBold", "Helvetica Neue", Arial, Helvetica, sans-serif;
}
#header nav ul li a {
color: #fff;
display:block;
height:32px;
position:relative;
text-transform:uppercase;
width:120px;
font-size: 11px;
}
#header nav ul li a span {
color: #333;
display:block;
line-height:12px;
height: 10px;
position:relative;
top:10px;
width:110px;
}