際際滷

際際滷Share a Scribd company logo
CSS in 11 slides.
Good Type of WaterfallCSS uses the DOM<div id=site> <h2>Big Header</h2>  <div class=post>   <h2>Title</h2>   <p>Text text text</p>  </div><div class=post>    <h2>Title</h2>    <p>Text text text</p>  </div>  <div class=post></div></div>h2{ font-weight: normal; color: green; }.post h2{ color: blue; }.site p { color: red; }div > p:first-child { color: purple; }
Cascading Style SheetsReset CSS  *{}Document-wide Style (DRY): body { font-size:			        12px }Most common type youll see/writeClose second; hardest to track down.BAD.
.class vs. #idSame syntax (selectors, pseudo-classes, properties)a#fb { background: url(/slideshow/introduction-to-css/6785662/img/18px_sprites.png)   no-repeat -17px left; margin-right: 7px; }.carouselImage{ z-index:0; left:40px; position:relative; color:blue;}#id{}s are unique to a page; singletons.classes come in groups (or at least can.)Why care?$(#fb).fadeOut();
Real-world Example
Helpful HintsOpen Source is Your FriendFirebug or Cmd+alt+IMargin vs. Padding(both increase the size of the box!!)Negative margin is bad.
Tools (cont.)
Block ModelBlock vis--vis in-line elementsBlock: <div>, <h#>, <table>, <form>, <(o|u)l>In-line: <img>, <a>, <i>, <b>, <u>, etc.You can redeclare as .{ display: block; } :table-cell, etc.
Always Float: Leftor :right, but never bothElements are floated horizontally; this means that an element can only be floated left or right, not up or down.A floated element will move as far to the left or right as it can. Usually this means all the way to the left or right of the containing element.--W3C Schools
The Internet Wants to Help(sort of)http://css-tricks.com/http://net.tutsplus.com/http://stackoverflow.com/http://smashingmagazine.com/http://unmatchedstyle.com/http://www.w3schools.com/Css/default.asphttp://lmgtfy.com/?q=background+image+css
One more thing
Windows Suckshttp://www.virtuosimedia.com/dev/css/ultimate-ie6-cheatsheet-how-to-fix-25-internet-explorer-6-bugs
Ad

Recommended

Tle html code january 18 2013
Tle html code january 18 2013
Mark Valmores
Web Information Systems Html and css
Web Information Systems Html and css
Artificial Intelligence Institute at UofSC
Neoito How modern browsers work
Neoito How modern browsers work
Neoito
悽惶 惠悸 惠惶 惶忰悋惠 悋惡 - 悋忰惆悸 悋惓悋惓悸 (悋悴慍悄 悋惓悋惓)
悽惶 惠悸 惠惶 惶忰悋惠 悋惡 - 悋忰惆悸 悋惓悋惓悸 (悋悴慍悄 悋惓悋惓)
悴悋惺悸 悋惆愕 悋惠忰悸
Web Information Systems XML
Web Information Systems XML
Artificial Intelligence Institute at UofSC
Working with External CSS
Working with External CSS
davereece
The Ulta-Handy HTML Guide
The Ulta-Handy HTML Guide
jsved
Tod night spectacular flier english
Tod night spectacular flier english
weiss2001
Firefox Extension Development | By JIIT OSDC
Firefox Extension Development | By JIIT OSDC
Vaidik Kapoor
Html1
Html1
Emily McWorthy
Mongo db onepage
Mongo db onepage
Milind Zodge
Quan Head Tag Presentation
Quan Head Tag Presentation
Quanslides
Google better with google, Updated 2014 01 05
Google better with google, Updated 2014 01 05
Wouter Gerritsma
Css, CaseCading Style Sheet
Css, CaseCading Style Sheet
Ishaq Shinwari
Intro to HTML
Intro to HTML
Gerson Abesamis
03 Getting Started
03 Getting Started
Makoto Ohnami
Html tag html 10 x10 wen liu art 2830
Html tag html 10 x10 wen liu art 2830
Wen Liu
Css siva
Css siva
ch samaram
Css siva
Css siva
ch samaram
Embrace the Mullet: CSS is the 'Party in the Back' (a CSS How-to)
Embrace the Mullet: CSS is the 'Party in the Back' (a CSS How-to)
Tom Hapgood
Basics Of Css And Some Common Mistakes
Basics Of Css And Some Common Mistakes
sanjay2211
CSS Overview
CSS Overview
Doncho Minkov
Hardcore CSS
Hardcore CSS
PDX Web & Design
CSS CASCADING STYLE SHEET - MY_PPT.pptx
CSS CASCADING STYLE SHEET - MY_PPT.pptx
IorlahaSamuel1
Make Css easy(part:2) : easy tips for css(part:2)
Make Css easy(part:2) : easy tips for css(part:2)
shabab shihan
Artdm171 Week5 Css
Artdm171 Week5 Css
Gilbert Guerrero
CSS.pptx
CSS.pptx
VijayKumarLokanadam
CSS Basic and Common Errors
CSS Basic and Common Errors
Hock Leng PUAH
CSS - Basics
CSS - Basics
Shubham_Saurabh
Ch. 3 HTML5, CIS 110 13F
Ch. 3 HTML5, CIS 110 13F
mh-108

More Related Content

What's hot (9)

Firefox Extension Development | By JIIT OSDC
Firefox Extension Development | By JIIT OSDC
Vaidik Kapoor
Html1
Html1
Emily McWorthy
Mongo db onepage
Mongo db onepage
Milind Zodge
Quan Head Tag Presentation
Quan Head Tag Presentation
Quanslides
Google better with google, Updated 2014 01 05
Google better with google, Updated 2014 01 05
Wouter Gerritsma
Css, CaseCading Style Sheet
Css, CaseCading Style Sheet
Ishaq Shinwari
Intro to HTML
Intro to HTML
Gerson Abesamis
03 Getting Started
03 Getting Started
Makoto Ohnami
Html tag html 10 x10 wen liu art 2830
Html tag html 10 x10 wen liu art 2830
Wen Liu
Firefox Extension Development | By JIIT OSDC
Firefox Extension Development | By JIIT OSDC
Vaidik Kapoor
Mongo db onepage
Mongo db onepage
Milind Zodge
Quan Head Tag Presentation
Quan Head Tag Presentation
Quanslides
Google better with google, Updated 2014 01 05
Google better with google, Updated 2014 01 05
Wouter Gerritsma
Css, CaseCading Style Sheet
Css, CaseCading Style Sheet
Ishaq Shinwari
03 Getting Started
03 Getting Started
Makoto Ohnami
Html tag html 10 x10 wen liu art 2830
Html tag html 10 x10 wen liu art 2830
Wen Liu

Similar to Introduction to CSS (20)

Css siva
Css siva
ch samaram
Css siva
Css siva
ch samaram
Embrace the Mullet: CSS is the 'Party in the Back' (a CSS How-to)
Embrace the Mullet: CSS is the 'Party in the Back' (a CSS How-to)
Tom Hapgood
Basics Of Css And Some Common Mistakes
Basics Of Css And Some Common Mistakes
sanjay2211
CSS Overview
CSS Overview
Doncho Minkov
Hardcore CSS
Hardcore CSS
PDX Web & Design
CSS CASCADING STYLE SHEET - MY_PPT.pptx
CSS CASCADING STYLE SHEET - MY_PPT.pptx
IorlahaSamuel1
Make Css easy(part:2) : easy tips for css(part:2)
Make Css easy(part:2) : easy tips for css(part:2)
shabab shihan
Artdm171 Week5 Css
Artdm171 Week5 Css
Gilbert Guerrero
CSS.pptx
CSS.pptx
VijayKumarLokanadam
CSS Basic and Common Errors
CSS Basic and Common Errors
Hock Leng PUAH
CSS - Basics
CSS - Basics
Shubham_Saurabh
Ch. 3 HTML5, CIS 110 13F
Ch. 3 HTML5, CIS 110 13F
mh-108
LIS3353 SP12 Week 13
LIS3353 SP12 Week 13
Amanda Case
Big Design Conference: CSS3
Big Design Conference: CSS3
Wynn Netherland
Fwd week2 tw-20120903
Fwd week2 tw-20120903
TerryWeber
CSS_tutorial_2
CSS_tutorial_2
tutorialsruby
CSS_tutorial_2
CSS_tutorial_2
tutorialsruby
Web Development - Lecture 5
Web Development - Lecture 5
Syed Shahzaib Sohail
Cascading Style Sheets for web browser.pptx
Cascading Style Sheets for web browser.pptx
alvindalejoyosa1
Embrace the Mullet: CSS is the 'Party in the Back' (a CSS How-to)
Embrace the Mullet: CSS is the 'Party in the Back' (a CSS How-to)
Tom Hapgood
Basics Of Css And Some Common Mistakes
Basics Of Css And Some Common Mistakes
sanjay2211
CSS CASCADING STYLE SHEET - MY_PPT.pptx
CSS CASCADING STYLE SHEET - MY_PPT.pptx
IorlahaSamuel1
Make Css easy(part:2) : easy tips for css(part:2)
Make Css easy(part:2) : easy tips for css(part:2)
shabab shihan
CSS Basic and Common Errors
CSS Basic and Common Errors
Hock Leng PUAH
Ch. 3 HTML5, CIS 110 13F
Ch. 3 HTML5, CIS 110 13F
mh-108
LIS3353 SP12 Week 13
LIS3353 SP12 Week 13
Amanda Case
Big Design Conference: CSS3
Big Design Conference: CSS3
Wynn Netherland
Fwd week2 tw-20120903
Fwd week2 tw-20120903
TerryWeber
Cascading Style Sheets for web browser.pptx
Cascading Style Sheets for web browser.pptx
alvindalejoyosa1
Ad

Introduction to CSS

  • 1. CSS in 11 slides.
  • 2. Good Type of WaterfallCSS uses the DOM<div id=site> <h2>Big Header</h2> <div class=post> <h2>Title</h2> <p>Text text text</p> </div><div class=post> <h2>Title</h2> <p>Text text text</p> </div> <div class=post></div></div>h2{ font-weight: normal; color: green; }.post h2{ color: blue; }.site p { color: red; }div > p:first-child { color: purple; }
  • 3. Cascading Style SheetsReset CSS *{}Document-wide Style (DRY): body { font-size: 12px }Most common type youll see/writeClose second; hardest to track down.BAD.
  • 4. .class vs. #idSame syntax (selectors, pseudo-classes, properties)a#fb { background: url(/slideshow/introduction-to-css/6785662/img/18px_sprites.png) no-repeat -17px left; margin-right: 7px; }.carouselImage{ z-index:0; left:40px; position:relative; color:blue;}#id{}s are unique to a page; singletons.classes come in groups (or at least can.)Why care?$(#fb).fadeOut();
  • 6. Helpful HintsOpen Source is Your FriendFirebug or Cmd+alt+IMargin vs. Padding(both increase the size of the box!!)Negative margin is bad.
  • 8. Block ModelBlock vis--vis in-line elementsBlock: <div>, <h#>, <table>, <form>, <(o|u)l>In-line: <img>, <a>, <i>, <b>, <u>, etc.You can redeclare as .{ display: block; } :table-cell, etc.
  • 9. Always Float: Leftor :right, but never bothElements are floated horizontally; this means that an element can only be floated left or right, not up or down.A floated element will move as far to the left or right as it can. Usually this means all the way to the left or right of the containing element.--W3C Schools
  • 10. The Internet Wants to Help(sort of)http://css-tricks.com/http://net.tutsplus.com/http://stackoverflow.com/http://smashingmagazine.com/http://unmatchedstyle.com/http://www.w3schools.com/Css/default.asphttp://lmgtfy.com/?q=background+image+css

Editor's Notes

  • #4: IF YOU HAVE ONE TAKE-AWAY