Difference between revisions of "HTML/CSS"

From Things and Stuff Wiki
Jump to navigation Jump to search
Line 1: Line 1:
 
{{techy}}
 
{{techy}}
  
=== Specificity ===
+
to merge from bits of design.
 +
 
 +
== Specificity ==
 
  p has a specificity of 1 (1 HTML)
 
  p has a specificity of 1 (1 HTML)
 
  div p has a specificity of 2 (2 HTML; 1+1)
 
  div p has a specificity of 2 (2 HTML; 1+1)
Line 13: Line 15:
 
* http://net.tutsplus.com/tutorials/html-css-techniques/the-30-css-selectors-you-must-memorize/
 
* http://net.tutsplus.com/tutorials/html-css-techniques/the-30-css-selectors-you-must-memorize/
  
=== Positioning ===
+
== Positioning ==
 
  display: block - default 100% width, flows vertically
 
  display: block - default 100% width, flows vertically
 
  display: inline - consumes width of content, flows horizontally
 
  display: inline - consumes width of content, flows horizontally
Line 30: Line 32:
 
* http://paulirish.com/2012/box-sizing-border-box-ftw/ [http://www.jefftk.com/news/2012-02-18.html]
 
* http://paulirish.com/2012/box-sizing-border-box-ftw/ [http://www.jefftk.com/news/2012-02-18.html]
  
=== background ===
+
== Responsive ==
 +
* http://webdesignerwall.com/tutorials/css-elastic-videos
 +
 
 +
== background ==
 
* http://whereswalden.com/files/mozilla/background-size/more-examples.html
 
* http://whereswalden.com/files/mozilla/background-size/more-examples.html
  
 
* http://www.impressivewebs.com/image-tint-blend-css/
 
* http://www.impressivewebs.com/image-tint-blend-css/
  
=== Animations & transitions ===
+
== Animations & transitions ==
 
* http://www.jasondavies.com/animated-bezier/
 
* http://www.jasondavies.com/animated-bezier/
  
=== Resets, etc. ===
+
== Resets, etc. ==
 
* 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/
Line 44: Line 49:
 
* http://html5boilerplate.com/docs/css/
 
* http://html5boilerplate.com/docs/css/
  
=== Grid ===
+
== Grid ==
 
* http://blog.centresource.com/2009/06/15/6-tips-and-tricks-for-designing-with-960/
 
* http://blog.centresource.com/2009/06/15/6-tips-and-tricks-for-designing-with-960/
 
* http://divitodesign.com/css/tricks-to-solve-960-css-framework-problems/
 
* http://divitodesign.com/css/tricks-to-solve-960-css-framework-problems/
  
=== Vertical rhythm ===
+
== Vertical rhythm ==
 
* [http://webtypography.net/toc/ The Elements of Typographic Style Applied to the Web]
 
* [http://webtypography.net/toc/ The Elements of Typographic Style Applied to the Web]
 
** [http://webtypography.net/toc#Vertical_Motion Vertical Motion]
 
** [http://webtypography.net/toc#Vertical_Motion Vertical Motion]
Line 58: Line 63:
 
* https://github.com/pyrsmk/vertical-rhythmic - sass mixins (no sure if worth it)
 
* https://github.com/pyrsmk/vertical-rhythmic - sass mixins (no sure if worth it)
  
=== Typography ===
+
== Typography ==
 
* [http://drewish.com/tools/vertical-rhythm CSS with vertical rhythm] - drewish.com
 
* [http://drewish.com/tools/vertical-rhythm CSS with vertical rhythm] - drewish.com
 
* [http://lamb.cc/typograph/ Scale & Rhythm]
 
* [http://lamb.cc/typograph/ Scale & Rhythm]
  
=== Font symbols ===
+
== Font symbols ==
 
* http://news.ycombinator.com/item?id=3672526
 
* http://news.ycombinator.com/item?id=3672526
 
* http://news.ycombinator.com/item?id=3675301
 
* http://news.ycombinator.com/item?id=3675301
  
=== Sprites ===
+
== Sprites ==
 
* http://www.phpied.com/command-line-css-spriting/
 
* http://www.phpied.com/command-line-css-spriting/
  
=== Header, footer ===
+
== Header, footer ==
 
* http://stackoverflow.com/questions/643879/css-to-make-html-page-footer-stay-at-bottom-of-the-page-with-a-minimum-height
 
* http://stackoverflow.com/questions/643879/css-to-make-html-page-footer-stay-at-bottom-of-the-page-with-a-minimum-height
  
=== Menus ===
+
== Menus ==
 
* http://stackoverflow.com/questions/2865380/how-do-i-center-align-horizontal-ul-menu
 
* http://stackoverflow.com/questions/2865380/how-do-i-center-align-horizontal-ul-menu
  
=== Gradients ===
+
== Gradients ==
 
* [http://www.colorzilla.com/gradient-editor/ ColorZilla Ultimate CSS Gradient Generator]
 
* [http://www.colorzilla.com/gradient-editor/ ColorZilla Ultimate CSS Gradient Generator]
  
=== Misc ===
+
== Misc ==
 
* http://mathiasbynens.be/notes/css-without-html
 
* http://mathiasbynens.be/notes/css-without-html

Revision as of 00:00, 2 June 2012


to merge from bits of design.

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])

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

Typography

Font symbols

Sprites

Header, footer

Menus

Gradients

Misc