CSS Primer
From Dreamwidth Notes
Revision as of 10:05, 24 April 2011 by Ninetydegrees (Talk | contribs)
You might also want to look at the HTML Primer. This is not a complete list of CSS rules and effects--it's mostly organized links to better references.
Contents
CSS Basics
CSS Cascade -- a slideshow that explains how the browser decides which rules to apply.
Use this tutorial to get a good handle on CSS selectors: Selectutorial: CSS selectors.
This is a summary on the types of units available when you're trying to say what size something is: CSS Units
Reset
A lot of the time you want to "reset" browser defaults to the same, so that there will be less variation from browser to browser and your rules will be more robust.
Dimensions
Margins and Padding
These are mainly used with block elements.
Font and Text
- font-family
- font-size
- font-style
- font-variant
- font-weight
- font (shorthand)
Backgrounds
These properties
- background-color
- background-image
- background-repeat
- background-attachment
- background-position
- background (all in one shortcut)
Modern browsers support multiple background image declarations:
Borders
- border-width
- border-style
- border-color
- border (all in one shorthand)
Positioning
Absolute, Relative, Fixed
Floats
References
- CSS Positioning 101
- CSS Floats 101
- CSS Positioning
- Step by step tutorial on floats
- CSS Float Theory: Things You Should Know
- Absolute vs. Relative - Explaining CSS Positioning
- Absolute positioning inside relative positioning
- CSS Layout
Lists
Tables
References
Block versus inline display
- display -- You can make a span display like a block element, or a div display like an inline element, with this rule.
References
- CSS3 Litmus -- which browsers support what CSS3 attributes (note: does not include FF4)