HTML and CSS Reference
In-Depth Information
Defining Values for Four-Sided Properties
Properties such as margin , padding , and border-width are used to
define values for all four sides of a block (whereas margin-right
defines the right margin alone). These properties, and those like
them, can take from one to four space-separated values that are
applied to the sides in the following manner:
If one value is listed (for example, 10px ), that value is applied to all
four sides.
If two values are listed (for example, 10px 5% ), the first value is
applied to the top and bottom, while the second is applied to the
right and left sides.
If three values are listed (for example, 10px 5% 20px ), the first value
is applied to the top, the second to both the right and left sides,
and the last to the bottom.
If four values are listed (for example, 10px 5% 20px auto ), the values
are applied clockwise starting from the top (top, right, bottom, left).
At-Rules
At-rules are statements that begin with the character for at ( @ ), followed
by a rule type or identifier, and end with a semicolon. Unlike rule sets,
at-rules do not contain declarations directly but offer additional context
or commands for the processing of style sheet information. Here's an
example:
/* include file additional.css */
@import “additional.css”
/* target specific media with contained rules */
 
Search WWH ::




Custom Search