Book HomeCascading Style Sheets: The Definitive GuideSearch this book Tuesday 21st of October 2014 02:29:45 AM

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 This is an easy one. If you want Navigator 4 to use CSS at all, you have to go to the preferences dialog and check the boxes for both style sheets and JavaScript. If JavaScript is disabled, Navigator will not apply styles. Why? In the early days of style sheets, there were a number of proposals for styling. One of these was JavaScript Style Sheets ( JSSS), an interesting hybrid of early CSS and JavaScript. It probably won't surprise you to learn that JSSS was promoted by Netscape. Although JSSS was never adopted, Navigator 4's rendering engine 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.

without affecting other hyperlinks throughout the document.

6.1. Colors

There is really only one type of color in CSS, and that's plain, solid color. If you set the background of a page to be red, then the entire background will be the same shade of red. This is no different than what's been possible in HTML up until now, of course. When you declare <BODY LINK="blue"section:

top: 10%; bottom: 20%; left: 50%; right: 10%;min-width: 20em; min-height: 30em;

Of course, this still isn't a very good solution, since itforces the element to be at least 20em wide by30em tall. Here's a better one:

top: 10%; bottom: auto; left: 50%; right: 10%; height: auto; min-width: 15em;

Here we have a case where the element should be 40% as wide as the faces with labels like Italic, Cursive,and Kursivare usually mapped to the italic keyword, whileoblique can be assigned faces with labels such asOblique, Slanted,and Incline. italicized, but that any specially emphasized text within the quote should be upright. In order to employ this effect, shown in Figure 5-28, you would use these styles:

BLOCKQUOTE {font-style: italic;}
BLOCKQUOTE EM, BLOCKQUOTE I {font-style: normal;}
method of applying styles to a document. This can actually be used to one's advantage in "hiding" styles from these browsers. See
Chapter 11, "CSS in Action", for more details.

1.4.4. Actual Styles

H1 {color: maroon;}
BODY {background: yellow;}