Sunday 25th of February 2018 10:05:05 PM

Book Home

Cascading Style Sheets: The Definitive GuideSearch this book

Symbols | A | B | C | D

Figure 4-6

Figure 4-6. Negative indents and floating images

Any unit of length may be used with text-indent. In addition, percentage values are allowed. In this case, the percentage refers to the width of the parent element being indented. Thus, if you set the indent value to 5%, the first line of an affected element will be indented by 5% of the parent element's width, as shown in Figure 4-7:

DIV {width: 400px;}
| E
| F
| G
| H
| I
| J
| K
| L
| M
| N
| O
| P
| Q
| R
| S
| T
| U
| V
| W
| X
| Y
| Z


Index: A

absolute font sizes: 5.3.1. Absolute Sizes
absolute length units: 3.2.1. Absolute Length Units
absolute positioning: 9.3. Absolute Positioning
absolute URLs: 3.4. URLs
\:active pseudo-class: 2.4.1. Pseudo-Class Selectors
support for: 2.4.1.1. Real-world issues
adjacent-sibling selectors: 10.2.1.3. Adjacent-sibling selector
11.1.3. Case 3: Putting a Magazine Article Online
\:after pseudo-element: 10.2.3.5. Miscellaneous pseudo-elements and pseudo-classes
generated content: 10.4. Generated Content
aligning text: 4.1.1.2. Aligning text
4.1.3. Vertical Alignment
ALINK attribute: 2.4.1. Pseudo-Class Selectors
alternate style sheets: 1.4.1.1. LINK attributes
ancestors: 2.5. Structure
anchors: 2.4.1. Pseudo-Class Selectors
2.4.1. Pseudo-Class Selectors
angle values: 3.5. CSS2 Units
Arabic, text alignment default: 4.1.1.2. Aligning text
asterisk (*) in universal selector: 10.2.1.1. Universal selector
attribute matching: 10.2.2.1. Attribute matching
attribute selectors: 10.2.2. Attribute Selectors
aural media: 1.3.1. Limited Initial Scope
aural style sheets: 10.8.2. The Spoken Word
units for: 3.5. CSS2 Units
auto value, block-level elements: 8.2.2.2. Using auto
automatic numbering: 10.4.1. Automatic Numbering
azimuth property: 10.8.2. The Spoken Word


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


Library Navigation Links

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

few ideas to get you started.

This is a simple style sheet, as shown in Figure 6-19:

BODY {color: rgb(0%,50%,0%); background-color: #CCFFCC;}
H1, H2 {color: yellow; background-color: rgb(0,51,0);}
Figure 6-19

Figure 6-19. The results of a simple style sheet

This style sheet is more sophisticated (shown in Figure 6-20):

BODY {color: black; background-color: white;}
tag and then insert <BR> tags to specify exactly where you
do want the line breaks to occur.  You can also include <WBR>
tags to indicate where optional line breaks may occur if the line extends
beyond the right edge of the browser window. 

The preferred way to control text alignment is by including an ALIGN attribute in a block-level tag such as a paragraph <P ALIGN="left">, headline, e.g., <H2 ALIGN="center"> or page division <DIV ALIGN="right">.  Each of these should terminate with a correspondingbackground-position: center;}

Figure 6-50

Figure 6-50. Centering with a horizontal repeat

Therefore, setting a large image in the center of theBODY and then letting it repeat will cause it totile in all four directions: up, down, left, andright. The only difference background-positionmakes is in where the tiling starts. Figure 6-51shows the difference between tiling from the center of theBODY, and from its top left corner.