Prev | Current Page 548 | Next

Craig Grannell

"The Essential Guide to CSS and HTML Web Design"

Important declarations override all others.
p {color: red !important;}
Add comments to CSS files as follows:
/*
This is a comment in CSS
*/
/* This is a single-line comment */
When setting element dimensions (width, height, margins, etc.), one em is equal to
the font size of that element. However, when setting font sizes for an element, one em
is equal to the font size of its parent element. In both cases, this is measured relative
to the dimensions of the M character.
THE ESSENTIAL GUIDE TO CSS AND HTML WEB DESIGN
474
CSS REFERENCE
475
D
Property Values Description Inherited
background No
background-attachment scroll | fixed No
background-color No
background-image none | url No
background-position No
Continued
Defines the initial position of the
background image. Defaults to 0,0. Values
are usually paired: x,y. Combinations of
keyword, length, and percentage are
permitted, although combining keywords
with either length or percentages is buggy
in some browsers. If only one keyword is
provided, the other defaults to center. If
only one length or percentage is given, it
sets the horizontal position, and the
vertical position defaults to 50%.
See also Chapter 2, ???background-position.???
length |
percentage | top |
center | bottom |
left | right
Sets an element??™s background image.
Example:
background-image:
?? url(background_image.jpg);
See also Chapter 2, ???background-image.???
Defines an element??™s background color.


Pages:
536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560