ElEMENT-SPECIFIC SELECTORS
Modified class or ID selector which limits application to a specific element
h2.subheading {color: blue;}
div#sidebar {font-size: 80%;}
CSS & ID NAMING CONVENTIONS
- No whitespace or special characters
- CSS is case-sensitive
DESCENDENT SELECTORS
Highly specific slectors that target elements based on their location within other elements
div p span { color: blue;}
GROUPING SELECTORS
Allows you to group selectors together that share formatting
h1, h2, .quote {font-weight: normal; color: blue;}
CASCADE in CSS means the last rules applied wins.
MODULARIZATION OF CSS
- CSS3 is not a single specification
- CSS is now published as a series of modularized specifications
- Sections like Selectors are now in their own specifications
- This approach gives the W3C the ability to prioritize specs and react rapidly to new needs
Padding is added to the outside of an element's width.
MARGINS
- Margins represent the space between elements
- Margin values are not calculated as part of an element's total width
- Most elements have a default margin that you must account for
The top element's bottom margin and the bottom element's top margin will be collapsed and the larger margin will be applied.
RELATIVE POSITIONING
Elements are still considered part of normal document flow, but you can offset the element from its normal position using top, right, bottom, or left offset values.
ABSOLUTE POSITIONING
Elements are removed from normal document flow, and repositioned based on top, right, left, or bottom offset values. Elements are placed relative to the nearest positioned ancestor.
MEDIA QUERIES
Media queries allow you to combine media types with media property expressions, to further when styles are applied based on color, screen widthh, and other factors.
CSS RESET
A set of styles that nullify a browser's default style sheet, allowing designers to avoid conflicts between their styles and browser default styles.
The web is a constantly shifting landscape of technologies, strategies, consumers, and content. If there is one thing that we can be 100% sure of, it is change.