| Attribute |
Property |
Possible Values |
| hr{color:#e0e0e0;background:#e0e0e0;border:0;height:1px;} |
| font-family:verdana,arial,helvetica,sans-serif; |
border:1px solid #e0e0e0; |
| font:18px Helvetica; |
| @import |
Found inside the style container.
Enables loading of stylesheets from within external style sheets.
Placement: prior to other rules. |
@import url( sheet2.css ); |
| background: |
|
black url(shell-fade.jpg) 0 0 no-repeat fixed |
| background-attachment |
value |
fixed, default |
| background-color: |
color |
a color value |
| background-image: |
location |
none, url("location") |
| background-position |
value |
|
| background-repeat |
value |
repeat,repeat-x,repeat-y,no-repeat |
| border: |
width, style, color |
value for width
dotted, dashed, inset
a color value |
| border-bottom: |
width, style, color |
value for width
dotted, dashed, inset
a color value |
| border-color: |
value |
value for color
<color>, transparent, inherit |
| border-left: |
width, style, color |
value for width
dotted, dashed, inset
a color value |
| border-right: |
width, style, color |
value for width
dotted, dashed, inset
a color value |
| border-style: |
value |
value for style
dotted, dashed, solid, double, groove, ridge, inset, outset, none, inherit |
| border-top: |
width, style, color |
value for width
dotted, dashed, inset
a color value |
| border-width: |
value |
value for width
thin, medium, thick, <length>, inherit |
| class selectors |
Enables subclassing classes by specifying which
element-type to affect.
|
p.warning { font-weight : bold; } |
| clear: |
value |
none, left, right, both |
| color: |
color |
a color value |
| cursor: |
value |
auto, crosshair,
default, hand, move, text, wait, help,
n-resize, ne-resize, nw-resize, s-resize,
se-resize, sw-resize, e-resize, w-resize |
| display |
Initial value: inline. Applies to all elements. Not inherited. |
none, block, inline, inline-block, list-item,
run-in,table, inline-table, table-row-group, table-column-group,
table-footer-group, table-row, table-column-group, table-column,
table-cell, table-caption, inherit
|
| frame resizing: |
value |
noresize |
| frame scrolling: |
value |
yes, no, auto |
| frameborder: |
value |
- frameborder="#" - A zero value shows no "window" border
- border="#"- Modifies the border width, used by Netscape.
- framespacing="#" -Modifies the border width, used by Internet Explorer.
|
| font-family: |
familyName |
Times,Helvetica,serif,
sans-serif, Courier, Western, cursive
Generic fonts: serif, sans-serif, monospace, cursive and fantasy. |
| font-size: |
size
|
xx-small, small, medium,
large, x-large, xx-large
value in cm, mm, in, pt, px, pc
percentage |
| font-style: |
style |
normal, italic, oblique |
| font-variant: |
variant |
normal, small-caps |
| font-weight: |
weight |
normal, bold, bolder, lighter,
100, 200, 300,... 900 |
| height: |
value |
value in cm, mm, in, pt, px, pc
percentage |
| letter-spacing: |
value |
normal
value in cm, mm, in, pt, px, pc |
| line-height: |
value |
normal
value in cm, mm, in, pt, px, pc
percentage |
| list-style-image: |
URL |
url(location) |
| list-style-type: |
type |
disc, circle, square, decimal, none
lower-roman, upper-roman, lower-alpha, upper-alpha |
| margin: |
value |
value in cm, mm, in, pt,
px, pc
percentage |
| margin-left: |
value |
value in
cm, mm, in, pt, px, pc
percentage |
| margin-right: |
value |
value in
cm, mm, in, pt, px, pc
percentage |
| margin-top: |
value |
value in
cm, mm, in, pt, px, pc
percentage |
| padding: |
value |
value in
cm, mm, in, pt, px, pc
percentage |
| text-align: |
alignment |
left, right, center, justify |
| text-decoration: |
decoration |
none, underline, overline,
line-through, blink |
| text-indent: |
indentation |
value in cm, mm, in, pt,
px, pc
percentage |
| text-transform: |
transformation |
none, capitalize (first letter of each word), uppercase,
lowercase |
| vertical-align: |
alignment |
baseline, sub, super,
top, middle, bottom, text-top, text-bottom |
| visibility: |
visibility |
inherit,
visible, hidden |
| white-space |
value |
value in cm, mm, in, pt, px, pc
percentage |
| width: |
value |
value in cm, mm, in, pt, px, pc
percentage |
| word-spacing |
value |
value in cm, mm, in, pt, px, pc
percentage |
| universal selector |
Matches any element at all, much like a wildcard.
|
* { color : red };
|
| |
| Pseudo-Classes |
| :active - this is the mouse-down for a hyperlink - must come last in the litany of a:'s |
| :hover |
| :link |
| :visited |
| |
| Pseudo-Elements |
| :first-letter |
| :first-line |
| Elements |
| Elements | Styles | Notes |
| Conflicting Rules | Order of Precedence Per testing: order of appearance in the file precludes the rules here stated. The rules in any rule-source override rules in prior-listed rule sources.
The rules hold if the order of precedence is also the order of appearance in the file. |
- User agent styles (base styles defined within the web browser) are default.
- External style sheets will override user agent styles.
- Embedded style sheets will override external style sheets and user agent style sheets.
- Inline style sheets will override all.
An exception is if the author marks a given rule as ! important. In CSS2, any rule containing this demarcation overrides any other rule anywhere in the cascade.
|
| sup | font-size: 0.75em; line-height: 0.5em | superscript |