you could have eliminated the div and simply put the id on the ul tag and gotten the same result, but yes, that is what the div is used for.
#tabs refers to the tabs id.
#tabs li makes sure that all li tags within the element with id="tabs" have the formatting outlined within the curly brackets.
here is a class example. classes can be used over and over again instead of just once like id's. classes start with a period (.) and are followed by a class name. look at this example:
ul.greenbullet li {
list-style-type:none;
list-style-image:url(images/greenbullet.gif);
list-style-position:outside;
}
or if you don't like typing, simply
.greenbullet li {
list-style-type:none;
list-style-image:url(images/greenbullet.gif);
list-style-position:outside;
}
- blah
- more blah
the ol only works if you used the latter class definition, ecause the first one nails it down to UL tags only that have the greenbullet class.
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4… {
padding: 0;
margin: 0;
}
tells that the body tag contents (the body of the document), dl, dt, dd, ul, ol, li, h1, h2, h4, h4 will be flush left with the browser window, no padding. Your lists will look really flat. as for the li tag, whichever declarations come last have the highest priority and will be chosen first.