Thursday 28th of April 2016 11:47:30 PM

Book Home

Cascading Style Sheets: The Definitive GuideSearch this book

Symbols | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z

Index: Y

There are no index entries for this letter.

Symbols | A | B | C | D | E | F | G | H | I | J | K | L Falling back on solid

There is one interesting thing about CSS that can make life difficult for authors. According to CSS1, a user agent is allowed to interpret any value of border-style (besides none) as solid. Because of this allowance, a user agent that is technically CSS1-compliant could display the following as all solid:

P.new3 {border-style: ridge dashed double;}
M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z

Library Navigation Links

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

box is always as tall as the biggest line-heightvalue contained within that line box (since this will coincide withthe height of the tallest inline box in the line), so this works.Furthermore, it only affects those lines in which a hyperlinkappears. However, there is yet another alternative. Scaling the line heights

There's an even better way to setP {margin-top: 0;}

This is, after all, one correct way to eliminate the space between succeeding elements. Navigator 4.x, however, will display the elements with the usual blank line between them, as you can see in Figure 7-26. This is because it's adding the zero values to its own default margins.

Figure 7-26

Figure 7-26. Navigator 4.x and margins

If you want to overcome this space, you can always use negative margins. Here's one possible declaration:

OL LI {list-style-type: decimal;} {list-style-type: none;}
<LI>Item the first
<LI CLASS="off">Item the second
<LI>Item the third
<LI CLASS="off">Item the fourth
<LI>Item the fifth
Figure 7-80

Figure 7-80. Switching off list-item markers

the inline element on multiple lines is like cutting up the strip into smaller strips. However, no extra plastic is added to each smaller strip. The only plastic used is that which was on the strip to begin with, so it only appears at the beginning and end of the inline element.

7.3.8. Margins: Known Issues

As useful as margins are, a number of problems can arise with their

This all seems simple enough, but when the boldfaced text stretchesacross multiple lines, the situation becomes a little odd. First,realize that the margins set for inline elements are not applied atthe point where line-breaking occurs. This line-breaking happens inthe course of wrapping text so that it fits inside thebrowser's window, for example, or inside a parent element. Theonly effect margins have on line-breaking is that, by causing extraspace to appear within the line, they can move content over. This maycause a line to break at a different spot than it ordinarily wouldhave.