- CSS box models
- Floats
- Normalize.css vs resets
- Em and rem units
- When to use the button element
- Using non-standard fonts
- Image replacement techniques
- Writing efficient CSS
There are 2 different box models:
-
In the W3C box model, the width of an element gives the width of the content of the box, excluding padding and border.
-
In the traditional box model, the width of an element gives the width between the borders of the box, including padding and border.
By default, all browsers use the W3C box model, with the exception of IE in "Quirks Mode" (IE5.5 Mode), which uses the traditional one.
The box-sizing property allows you to switch box models:
box-sizing: border-box
box-sizing: content-box
The first declaration will cause the box sizes to be applied to the border and everything inside it (traditional model), the second one will cause the box sizes to be applied to the content only (W3C model).
Use the universal selector to apply a natural box layout model to all elements, but allowing components to change
html {
box-sizing: border-box;
}
*, *:before, *:after {
box-sizing: inherit;
}
Compatibility : IE8+ http://caniuse.com/#search=box-sizing
Source:
http://quirksmode.org/css/user-interface/boxsizing.html
http://www.paulirish.com/2012/box-sizing-border-box-ftw/
Source: http://css-tricks.com/all-about-floats/
Source: https://j.eremy.net/confused-about-rem-and-em/
Source: http://css-tricks.com/use-button-element/
Webfonts (font services like: Google Webfonts, Typekit etc.)
Source: http://css-tricks.com/css-image-replacement/
Source: http://csswizardry.com/2012/05/keep-your-css-selectors-short/