Book Home Saturday 29th of August 2015 09:18:48 AM Cascading Style Sheets: The Definitive GuideSearch this book

So let's assume that you want to define a border style for images that are inside a hyperlink. You might make them outset, so they have a "raised button" look, as depicted in Figure 7-31:

A:link IMG {border-style: outset;}
Figure 7-31

Figure 7-31. Applying an outset border to a hyperlinked image

Again, the color of the border is based on the element's value for color, which in this circumstance is likely to be blue (although we can't show that in print). This is due to 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.

and other inline content and not to block-level elements. We can set a line-height value for a block-level element, but the only way this will have any visual impact is by being applied to inline content within that block-level element. Consider the following paragraph, for example:

<P STYLE="line-height: 0.25em;"></P>

Without content, the paragraph won't have anything to display, so it will not. The fact that this paragraph has a line-height of any value -- be it browser honors negative margins on floated elements. If it does, theresult will be something like that shown in Figure 7-71.

Figure 7-71

Figure 7-71. Hanging float

There is one important question here, which is this: what happens tothe document display when an element is floated out of its parentelement by using negative margins? For example, an image could befloated so far up that it intrudes into a paragraph that has alreadybeen displayed by the user agent.

safe bet that most people don't. It would make far more senseto specify a single font family for the whole document and thenassign weights to various elements. You can do this, in theory, usingthe various values for the property font-weight. Afairly obvious font-weight declaration is this:

B {font-weight: bold;}

This says, simply, that the B element should bedisplayed using a boldface font; or, to put it another way, a fontthat is heavier than is normal for the document, as shown in Figure 5-8. This is what we're used to, of course,