Difference between revisions of "HTML/CSS"

From Things and Stuff Wiki
Jump to navigation Jump to search
Line 46: Line 46:
 
* http://blog.themeforest.net/tutorials/vertical-centering-with-css/ [http://douglasheriot.com/tutorials/css_vertical_centre/demo4.html]
 
* http://blog.themeforest.net/tutorials/vertical-centering-with-css/ [http://douglasheriot.com/tutorials/css_vertical_centre/demo4.html]
 
* http://css-tricks.com/what-is-vertical-align/
 
* http://css-tricks.com/what-is-vertical-align/
 +
* http://www.barelyfitz.com/screencast/html-training/css/positioning/
  
 
=== Tips ===
 
=== Tips ===
Line 69: Line 70:
  
 
== Resets, etc. ==
 
== Resets, etc. ==
 +
* http://necolas.github.com/normalize.css/
 +
* http://html5boilerplate.com/
 +
 
* https://github.com/necolas/normalize.css/wiki [http://stackoverflow.com/questions/6887336/what-is-the-different-between-normalize-css-and-reset-css]
 
* https://github.com/necolas/normalize.css/wiki [http://stackoverflow.com/questions/6887336/what-is-the-different-between-normalize-css-and-reset-css]
 
** http://nicolasgallagher.com/about-normalize-css/
 
** http://nicolasgallagher.com/about-normalize-css/

Revision as of 00:49, 15 June 2012


to merge from bits of design.

General

Specificity

p has a specificity of 1 (1 HTML)
div p has a specificity of 2 (2 HTML; 1+1)
.sith has a specificity of 10 (1 class)
div p.sith has a specificity of 12 (2 HTML and a class; 1+1+10)
#sith has a specificity of 100 (1 id)
body #darkside .sith p has a specificity of 112 (HTML, id, class, HTML; 1+100+10+1)

[1] [2] ([3]),[4]

Selectors

h1 + h2
  <h1></h1><h2></h2>

h1 > h2
  <h1><h2></h2></h1>

Positioning

display: block - default 100% width, flows vertically
display: inline - consumes width of content, flows horizontally
display: inline-block
  http://www.quirksmode.org/css/display.html
float - floats element next to containing box or other floated element
position: absolute - out of flow
rgba(0, 0, 0, 0.2) - shadow

Tips

Responsive

background

Animations & transitions

Resets, etc.

Grid

Vertical rhythm

Web

JS

Bookmarklets

CSS

Sass

Font symbols

Sprites

Header, footer

Menus

Gradients

Misc

Preprocess