Book HomeCascading Style Sheets: The Definitive GuideSearch this book Friday 28th of April 2017 06:21:08 AM

10.9. Summary

CSS2 obviously covers a lot of ground, and exploring it in detail would probably have added at least four more chapters to this book, not to mention dramatically bulking up some of the chapters that already exist. However, since so little of CSS2 has actually been implemented at this writing, we felt it was better to provide an overview that was light on details. After all, the specification may change as implementations reveal flaws, and we'd rather stick to describing things that are fairly reliable.

For quick reference purposes, Table 10-1 gives a quick summary of everything new in CSS2.

Table 10-1. New Properties in CSS2

New Properties in CSS2

text-shadow
font-size-
adjust
font-stretch
unicode-bidi
cursor
outline
outline-color
outline-style
outline-width
content
quotes
counter-reset
counter-increment
marker-offset
border-top-color
border-right-color
border-bottom-color
border-left-color
border-top-style
border-right-style
border-bottom-style
border-left-style
position
direction
top
right
bottom
left
z-index
min-width
max-width
min-height
max-height
overflow
clip
visibility
page-break-before
page-break-after
page-break-inside
orphans
widows
size
marks
border-collapse
border-spacing
table-layout
border-spacing
empty-cells
caption-side
speak-header-cell
volume
speak
pause-before
pause-after
pause
cue-before
cue-after
cue
play-during
azimuth
elevation
speech-rate
voice-family
pitch
pitch-range
stress
richness
speak-punctuation
speak-rate
speak-numeral
speak-time

New Pseudo-Classes and Pseudo-Elements in CSS2

:hover
:left
:right
:first
:before
:after

New @-rules in CSS2

@media
@font-face
@page

Table 10-2. New Values in CSS2

All Properties

inherit

The display Property

run-in
compact
marker
table
inline-table
table-row-group
table-column-group
table-header-group
table-footer-group
table-row
table-cell
table-caption 

The font Property

caption
icon
menu
message-box
small-caption
status-bar

The list-style-type Property

decimal-leading-zero
hebrew
georgian
armenian
cjk-ideographic
hiragana
katakana
hiragana-iroha
katakana-iroha
lower-greek

The color values

active-border
6.144). Many complicated pages have at least three levels of nesting,
and sometimes even more.

highlight
highlight-text
inactive-border
inactive-caption
info-background
info-text
menu
menu-text
scrollbar
three-d-dark-shadow
three-d-face
three-d-highlight
three-d-lightshadow
three-d-shadow
window
window-frame
window-text

The vertical-align Property

length 


Library Navigation Links

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

font-size to get the same value as thefont-size of every element. Thus, for everyelement, the inline box will be the same as the contentarea.

8.4.4. Inline Replaced Elements

Inlinereplaced elements, such as images, bottom as auto, then somethinglike Figure 9-7 will occur:

top: 0; bottom: auto; left: auto; right: 0; width: 33%; height: 45%;

Many of the same principles hold true for widths, of course. Forexample:

top: 100px; bottom: 200px; left: 30%; right: 10%; height: auto; width: auto;

Here, the width of the element is effectively 60% the width of itscontaining block.

  • If the ancestor is inline-level, the containing block is set to thecontent edge of the ancestor. In left-to-right languages, the top andleft of the containing block are the top and left content edges ofthe first box in the ancestor, and the bottom and right edges are thebottom and right content edges of the last box. In right-to-leftlanguages, the right edge of the containing block corresponds to theright content edge of the first box, and the left is taken from thelast box. The top and bottom are the same.

    In practice, some browsers do not do this correctly. Instead, theywill increase the height of a parent element so that the floatedelement is contained within it, even though this results in a greatdeal of extra blank space within the parent element.

    A related topic is the subject of backgrounds and their relationshipto floated elements that occur earlier in thedocument, which was also discussed in the previous chapter, as hasbeen illustrated in Figure 8-41.