attribute on the In almost all other ways, block-level replaced elements behave thesame as block-level elements when it comes to formatting: verticalmargins are collapsed while horizontal margins are not, and theborders and padding default to zero unless explicitly declareddark blue, and inherit, which is a valid value
under CSS2 but not CSS1, will come out as a really awful shade of
yellow-green. This is not correct behavior, but you'll need to
remember it as you write your styles.
6.1.1.4. Affecting form elements
Setting a value for color should (in theory,worry about one floated element obscuring another, you can be assured
that all of your floated content will be visible. This makes floating
a fairly safe thing to do. The situation is markedly different when
using positioning, where it is very easy to cause elements to
overwrite one another.
3. The right outer edge of a left-floating element may not
be to the right of the left outer edge of any right-floating element
to its right. The left outer edge of a right-floating element may not
be to the left of the right outer edge of any left-floating element
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. The results of a simple style sheet
This style sheet is more sophisticated (shown in Figure 6-20):
BODY {color: black; background-color: white;}
P {color: #333;}