does not exist. Those words were picked carefully because they helpexplain what's going on here. Since the border doesn'texist, it can't have any width, so the width is automaticallyset to 0 (zero). This may seem completelybackward, but it actually makes a great deal of sense. After all, ifa drinking glass is empty, you can't really describe it asbeing half-full of nothing. You can only discuss the depth of aglass's contents if it has actual contents. In the same way,talking about the width of a border only makes sense in the contextof borders that have some existence. Book Home Thursday 19th of January 2017 01:52:55 PM Cascading Style Sheets: The Definitive GuideSearch this book

Full Text Search

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.

the old method of BODY attributes, you could onlymake changes at the document level. For example, if you wanted somelinks to be medium gray and others a relatively dark gray, youcouldn't do that with the BODY attributes.Instead, you'd have to use <FONTCOLOR="#666666"> on every single anchor thatneeded to be relatively dark. Not so with CSS; all you need to do isadd a class to all anchors that need to be this shade of gray andmodify your styles accordingly, with the result seen in Figure 6-4:

Not only that, but if you're using lengths or percentages, youcan give negative values, thus pushing the image out of the element,to some degree. Consider the example with the very large yin-yangsymbol for a background. At one point, we centered it, but what if weonly want part of it visible in the top left corner of the containingelement? No problem, at least in theory. First, assume the image is300 pixels tall by 300 pixels wide. Then, assume that only the bottomright third of it should be visible. We can get the desired effect(shown in Figure 6-45) like this: