Book Home Sunday 26th of April 2015 05:36:58 PM Cascading Style Sheets: The Definitive GuideSearch this book

Full Text Search

7.7.3. List Item Positions

There is one other thing you can do to influence the appearance of list items under CSS1, and that's change the position of the bullet itself, in relation to the content of the list item. This is accomplished with list-style-position.

list-style-position

If you are having difficulty searching, or if you have not used this search utility before, please read this.


Library Navigation Links

Copyright © 2002 O'Reilly & Associates, Inc. All Rights Reserved.

P {margin: 5px; background-color: silver;
border-style: solid; border-width: 20px;}
Figure 7-39

Figure 7-39. Inflating the border width to unhealthy levels

This is all as expected: the style and width combine to create a border whose color is based on the foreground color of the element.

It's also possible to set widths for individual sides. This is done in two familiar ways. The first is to use any of the specific elements to have a thick, gray, solid border, but only along the bottom. There are two ways to accomplish this:

H1 {border-bottom-width: thick;   /* option #1 */
border-style: none none solid;
border-color: gray;}
H1 {border-width: 0 0 thick;     /* option #2 */
border-style: none none solid;
border-color: gray;}

Neither is really convenient, given all the typing involved. by side under identical lighting conditions, the background colorwould look different on each machine. This also crops up in graphicscreated for the Web, in that graphics created on Windows machinestend to appear darker to Macintosh users, whereas images created on aMacintosh look lighter for Windows users.

The situationdegrades even further when colors are printed, since factors asdiverse as the stock and color of the paper used, and even thetemperature of the printing mechanism, can affect how well colors arereproduced on paper.

In effect, this is yet anotherarea where you must remember that total control over document

If these seem like odd color names, it's because -- well, they are. In my opinion, anyway. So where do they come from? These colors were taken from the original sixteen basic Windows VGA colors, and browsers are supposed to generate colors that at least come close to matching those original 16. They may be a fairly motley collection of colors, but they're what we have.