Chap2.2 - Résumé CSS
Chap2.2 - Résumé CSS
Notation Used Below -- Each style property lists an example value or a list|of|possible|values
-- A default value for a property is given in bold.
Text Properties -- When set for a block, controls all text within the block.
font-family: Verdana, Helvetica, sans-serif; /* default value inherited from parent container */
font-size: 110%|1.1em|20px|16pt; /* default value inherited from parent container /
font-weight: normal|bold|600|700|800|900; /* available numeric values depend on the font being used */
font-style: normal|italic|oblique;
text-decoration: none|underline|overline|…;
text-indent: 20px|5em|10%;
text-align: left|right|center|justify;
line-height: 2.0|20px|200%|16pt;
vertical-align: baseline|text-top|text-bottom|top|middle|bottom; /
General Properties -- Mostly used for blocks, but some can be applied to inline elements as well.
color: #ff0000;
background-color: #ff0000;
cursor: auto|crosshair|help|move|pointer|progress|test|wait|…;
background-image: url("images/bg.gif");
background-repeat: repeat|repeat-x|repeat-y|no-repeat;
background-position: left top|left center|left bottom|center top|…; /* can also position with % or px */
background-size: 100px 100px; /* width height */ /* OR background-size: cover; (for full-page background) */
background-attachment: scroll|fixed;
position: static|relative|fixed|absolute;
top: px|%; /* for position of non-static blocks */
left: px|%; /* for position of non-static blocks */
z-index: 1|2|3|…; /* for stacking absolute position blocks */
float: none|left|right;
clear: none|left|right|both;
box-shadow: 10px 10px 5px #888888; /* See W3Schools for what these values mean */
text-shadow: 2px 2px #ff0000; /* See W3Schools for what these values mean */
Rule Properties -- Dynamic Properties, called CSS Rules, that induce some sort of action.
@font-face -- Specifies a portable, downloadable font for the page -- see W3Schools.
@media -- Specifies Media Query rules for dynamically adjusting to different screen sizes (monitor, tablet, phone) -- see W3Schools.
Lists and Tables -- See W3Schools for a variety of techniques. (Google Search for "CSS tables" or "CSS lists")
Properties Lacking Browser Support -- Some new properties are not yet uniformly supported in all browsers.
Browser-specific properties are prefixed by browser: -webkit (Chrome,Safari,Opera) , -moz (FireFox) , -ms (Internet Explorer)
Many Developers don't use these until they achieve uniform browser support and can be used without prefixes.
Examples: -webkit-column-count , -moz-column-count
-webkit-flex , –moz-flex , –ms-flex