This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | |||
|
notes:css_cheat_sheet [2026/06/07 03:35] 114.119.132.52 old revision restored (2026/06/03 01:52) |
notes:css_cheat_sheet [2026/06/07 04:23] (current) 114.119.151.209 old revision restored (2026/06/03 01:52) |
||
|---|---|---|---|
| Line 43: | Line 43: | ||
| * CSS uses C-style comments - /* comment */ . | * CSS uses C-style comments - /* comment */ . | ||
| - | ==== CSS Background/ | + | ==== CSS Properties ==== |
| * Background properties examples <code html> | * Background properties examples <code html> | ||
| background-color: | background-color: | ||
| Line 54: | Line 54: | ||
| * Text properties examples <code html> | * Text properties examples <code html> | ||
| color: # | color: # | ||
| - | text-align: | + | text-align: center/ |
| letter-spacing: | letter-spacing: | ||
| white-space: | white-space: | ||
| Line 61: | Line 61: | ||
| </ | </ | ||
| * Font properties examples <code html> | * Font properties examples <code html> | ||
| - | font-family: times/ | + | font-family; times/ |
| font-size-adjust: | font-size-adjust: | ||
| - | font-style: italic/ | + | font-style: italic/normal/oblique |
| font-weight: | font-weight: | ||
| font: italic small-caps 900 12px arial | font: italic small-caps 900 12px arial | ||
| font: caption/ | font: caption/ | ||
| - | ==== CSS Border/List Properties ==== | ||
| - | * Border properties examples (btlr=bottom/ | ||
| - | border-style: | ||
| - | border-btlr: | ||
| - | border-width: | ||
| - | border-color: | ||
| - | outline-color/ | ||
| - | * A margin describes space around the element. Padding defines the space between border and content.< | ||
| - | margin: width x 4 (trbl); margin-btlr | ||
| - | padding: width x 4 (trbl); padding-btlr</ | ||
| - | * List properties examples <code html> | ||
| - | list-style-type: | ||
| - | list-style-type: | ||
| - | list-style-image: | ||
| - | list-style-position: | ||
| - | list-style: type position image</ | ||
| - | * Table properties examples <code html> | ||
| - | table-layout: | ||
| - | border-collapse: | ||
| - | border-spacing: | ||
| - | </ | ||
| - | |||
| - | ==== Sizing and Positioning CSS Properties ==== | ||
| - | |||
| - | * Size properties examples <code html> | ||
| - | height/ | ||
| - | min/ | ||
| - | line-height: | ||
| - | |||
| - | * Position properties <code html> | ||
| - | display: inline/ | ||
| - | float: btlr ; | ||
| - | position: relative(to normal)/ | ||
| - | /fixed(rel to window, doesn' | ||
| - | bottom/ | ||
| - | vertical-align: | ||
| - | |||
| - | * Visibility properties <code html> | ||
| - | visibility: | ||
| - | clear: | ||
| - | clip: rect(10px, 5px, 10px, 5px) | ||
| - | overflow: | ||
| - | z-index: 1 (0 is normal) </ | ||
| - | |||
| - | ==== Advanced CSS ==== | ||
| - | * Pseudo classes can restrict the selector. a:hover and a:active may have to come after a:link and a:visited. <code html> | ||
| - | selector.class: | ||
| - | a:link {color: # | ||
| - | a:visited {color: # | ||
| - | a:hover {color: blue} (mouse-over element) | ||
| - | a:active {color: #0000FF} (selected element) | ||
| - | a:focus {color: #0000FF} (focused element - not in IE) | ||
| - | p: | ||
| - | p > em: | ||
| - | </ | ||