Friday 21st of July 2017 06:44:32 AM

Sitemap


Index

   WDG's CSS Reference

   WDG's Copyright and Trademark Information

   About the Web Design Group

   Style Sheets Now!

   CSS Quick Tutorial

   CSS Structure and Rules

   Declarations

   Pseudo-classes and Pseudo-elements

   Cascading Order

   CSS1 Units

   CSS Properties

   Linking Style Sheets to HTML

   Style Sheet Dependence

   CSS References

   Syntax Used in CSS Properties

   Font Family

   Font Style

   Font Variant

   Font Weight

   Font Size

   Font

   Color

   Background Color

   Background Image

   Background Repeat

   Background Attachment

   Background Position

   Background

   Word Spacing

   Letter Spacing

   Text Decoration

   Vertical Alignment

   Text Transformation

   Text Alignment

   Text Indentation

   Line Height

   Top Margin

   Right Margin

   Bottom Margin

   Left Margin

   Margin

   Top Padding

   Right Padding

   Bottom Padding

   Left Padding

   Padding

   Top Border Width

   Right Border Width

   Bottom Border Width

   Left Border Width

   Border Width

   Border Color

   Border Style

   Top Border

   Right Border

   Bottom Border

   Left Border

   Border

   Width

   Height

   Float

   Clear

   Display

   Whitespace

   List Style Type

   List Style Image

   List Style Position

only appears behind the text itself, as shown in Figure 6-17.

Figure 6-17

Figure 6-17. Navigator's incorrect behavior

Let me reiterate: this is totally wrong. However, there is a way around it, which is to set a border on the element. You can do this by setting the border the same color as the background color of your document:

BODY {background: silver;}
P {background-color: gray; padding: 1px; border: 0.1px solid gray;}

   List Style

   liam@htmlhelp.com

   john@htmlhelp.com

   Arnoud "Galactus" Engelfriet

   Ian Butler

   Tina Marie Holmboe

   Nick Kew

   HTML 3.2

   Amaya

   Emacs-W3

   CSS Positioning

   Fonts and the Web

   ACSS

   Printing support

   Layout

   Arena

   MSIE 3

   Navigator 4.0

   Style

   CODE

   Nick Kew

   BODY element

   HR - horizontal rule

   DD - definition

   Paragraph

   Emphasis

   LINK element

   HEAD element

   TITLE element

   BLOCKQUOTE

   DFN - definition

   DIV - logical division

   WebTechs

   IMG - images

   INPUT element

   TEXTAREA

   A - anchor element

:first-child selector. This is used to match an element that is the first child of another element. For example, you might want to make the first child of every DIV italicized instead of normal text, as long as that first child is a paragraph (shown in Figure 10-11):

Figure 10-11

Figure 10-11. Selecting styles for certain first children

The very first paragraph is italicized because it is the first child of the BODY element. Similarly, the first paragraph in the first DIV is italicized because

H2 {clear: both;}
Figure 7-76

Figure 7-76. Clear on both sides

If, on the other hand, we're only worried about H2 elements flowing past floated elements to their right, then we'd use H2 {clear: right;}, with the result shown in
Figure 7-77.
Figure 7-77

Figure 7-77. Clear to the right

Finally, there's clear: none, which allows elements to float to either side of an element. As with float: none, this value mostly exists to allow for normal document behavior, in which elements will permit floated elements to both sides. none can be used to override other