Book HomeCascading Style Sheets: The Definitive GuideSearch this book Wednesday 28th of June 2017 07:14:17 AM
declare what was already the case. In other words, there is no way to"turn off " underlining (or overlining or a line-through)within an element. If a decoration has been set for an element, thenall of its children will have the decoration applied visually, if notin fact.

Combined with vertical-align, evenstranger things will happen. Figure 4-60 shows butone of these oddities. Since the SUP element hasno decoration of its own, but it is elevated within an overlined

9.6. Summary

When it comes right down to it, positioning is a very compelling technology. It's also likely to be an exercise in frustration if you're trying to get it to behave consistently in a cross-browser environment. The problem isn't so much that it won't work in some browsers: it's that it will only sort of work in a number of them, such as Navigator 4 and Internet Explorer 4 and 5. It can be great fun to play with positioning, and one day we'll be able to use it in place of tables and frames while dramatically improving accessibility and backward compatibility. As of this writing, though, it remains a great way to create design prototypes, but a tricky thing to use on a public web site.

As it happens, this sentiment may be applied to the majority of CSS2, which is given an overview in the next chapter.

Library Navigation Links

Copyright © 2002 O'Reilly & Associates. All rights reserved.

should be dark red. However, in some cases H2 elements should be dark blue because they're associated with different types of information. The simplest way to handle this is to put a class of dkblue on each H2 that needs to be dark blue and declare the following:

H1 {color: green;}
H2 {color: blue;}
H2.dkblue {color: navy;}
Figure 9-23

Figure 9-23. Nested absolutely positioned elements

The small box B in the lower-left corner of the element A is a childof A, which is in turn a child of a relatively positionedDIV. B was absolutely positioned, as was elementA, using styles like these:

DIV {position: relative;}P.A {position: absolute; top: 0; right: 0; width: 15em; height: auto;margin-left: auto;}P.B {position: absolute; bottom: 0; left: 0; width: 10em; height: 50%;how inline elements are displayed, and it needs to be covered in
detail before we move on.

First, let's establish how the height of a line is determined. A line's height (or the height of the line box) is determined by the height of its constituent elements and other content (such as text). It's important to understand that line-height really only applies to inline elements and other inline content and not to block-level elements. We can set