SlideShare a Scribd company logo
1 of 54
CSS Essentials
For the one who care about layout




                 Tin@BrowBag 3 June 2011
Agenda
XHTML & CSS
CSS selector
Visual formatting & models
Basic sample
Advanced sample
Tricks and hacks
CSS deļ¬ne the visual model
Layout
Typography
Units
Rendering
Graphics
etc.
Era of CSS
Before the   movable-   Moden publishing
dawn         type
                        CSS 3
Agenda
XHTML & CSS
CSS selector
Visual formatting & models
Basic sample
Advanced sample
Tricks and hacks
XHTML and CSS
XHTML => data (structure)
CSS => presentation (visual)
Separation of concerns
Best practices:
  Use proper HTML tags
  Use meaningful class/id name (red-text warn-text)
  Minimizing HTML structure and CSS rules
Example of html
Agenda
XHTML & CSS
CSS selector
Visual formatting & models
Basic sample
Advanced sample
Tricks and hacks
CSS selector - Rule Structure
Selector             Declaration block

            Declaration        Declaration

  H1       { color: red;    background: yellow;   }


           Property Value    Property    Value
CSS selector - Basic
Element Selector
  Type selector: h1 { font-weight: bold;}
  Descendant selector: li a { text-decoration: none; }
Class Selector
  .warn { color: red }
  .full-width { width: 100% }
CSS selector - Basic
ID Selector
  #sidebar { ļ¬‚oat: right; width: 27em; }
Pseudo class
  a:link { color: blue; }
  li:hover { background-color: grey; }
  input:focus { background-color: yellow; }
  All pseudo class:
    :active, :after, :before, :ļ¬rst-child, :ļ¬rst-letter, :ļ¬rst-
    line, :focus, :hover, :lang, :link, :visited
CSS selector - advanced
Universal (wildcard) Selector
  * { padding: 0; margin: 0; }
Child selector: #nav > li
Adjacent Sibling selector: h1 + p
Simple Attribute selector:
  div[class]
  input[type=ā€inputā€], div[id~=ā€containerā€] ...
CSS Rule Speciļ¬city (Weight)
 Four level of speciļ¬city
   level 1(1000): inline style, <div style=ā€color: redā€>
   level 2(0100): ID selector
   level 3(0010): class, pseudo class, attribute selector
   level 4(0001): element selector, universal selector
   Special level: !important (except IE6)
   Draw game: last declaration win
CSS Rule Speciļ¬city
Rule                    Weight      Weight (digit)
Style=ā€ā€               1, 0, 0, 0      1000
#wrapped #content {}   0, 2, 0, 0       200
#content .date {}      0, 1, 1, 0       110
div#content {}         0, 1, 0, 1       101
#content {}            0, 1, 0, 0       100
p.comment .date {}     0, 0, 2, 1        21
p.comment {}           0,0, 1, 1         11
div p {}               0, 0, 0, 2         2
p {}                   0, 0, 0, 1         1
CSS: Inherit and cascading

Inheritance: Inherit ancestor elementā€™s style, color,
font-size (font*)
  descendants in dom tree inherit ancestorā€™s style
  none inherit: padding, margin, border, background
  no speciļ¬city (lowest priority)
CSS: Inherit and cascading
Cascading: different level of css rule composite
together
  all match selector declarations will be applied
    browser default style
    Inheritance
    selector declarations from lower to higher speciļ¬city
    the styles with !important
    later property overwrite former property
How to use them?
Real example (by Firebug)
Agenda
XHTML & CSS
CSS selector
Visual formatting & models
Basic sample
Advanced sample
Tricks and hacks
Element Classiļ¬cation
Nonreplaced Elements
  The majority of HTML elements are NE
  Their content box is generate by itself
Replaced Elements
  content box is replaced by something not directly
  represented by document content
  Image, ļ¬‚ash object, input element
Everything start form the ā€˜displayā€™ model



ā€œThe display property
speciļ¬es the type of box
an element should
generate.ā€
Era of CSS
Before the   movable-   Moden publishing
dawn         type
                        CSS 3
Whatā€™s the box?
Basic Box model
     margin: top right bottom left;
                border
               padding
        width

            Content Area
                        height
Basic Box model                  Background
     margin: top right bottom left;
                border
               padding
        width

            Content Area
                        height
Box model example (in ļ¬rebug)
IE box model quirks
                                                                             W3C
                                                                                    Actual width = margin * 2 + padding*2 +
                                                                                    border * 2 + width (css property)

                                                                                    content-width = width (css property)

                                                                             IE
                                                                                    Actual width = margin * 2 + width (css
                                                                                    property)

                                                                                    content-width = width - padding * 2


This ļ¬le is licensed under the CreativeĀ Commons AttributionĀ ShareAlikeĀ 3.0Ā Unported (http://en.wikipedia.org/wiki/Image:W3C_and_Internet_Explorer_box_models.png)
So... for IE compatibility

 Normally, donā€™t use padding and margin on same
 element, use it in different level
 Make IE doesn't work in quirks-mode
 Has-layout=true (zoom: 1, but canā€™t pass w3c validation)
 Donā€™t use width: 100% and padding on same element (for
 safty, use 95% or other safe value)
Element Display Roles - Block Level
 Block-Level is a element with property display: block
 It generate a box ļ¬lls its parentā€™s content area
 canā€™t have other element on itā€™s side
 it generate breaks before/after itā€™s box
 Use width/height to determine the size
 min-width/max-width
 Div is block element by default
 Use overļ¬‚ow control overļ¬‚ow content display/hide
Block-Level Layout

It generate a rectangular box called element box, which
describes the amount of space occupied by an element
  Background extends to the outer edge of the border
  Only margins, height, and width may be set to auto
  Only margins can be given negative values
  Padding & borders of element box default to 0 & none
  Width property deļ¬ne only the width of content area
Block box formating

        margin: top right bottom left;
                   border
                  padding
           width

               Content Area
                           height
Block box formating
        The containing block
                                                                      border
                                                                      padding
                  auto margin                             width
                                                                  Content Area
                                                                                 height




negative margin
                                                                     border
                                                                      padding
                                         width
                                                                  Content Area
                                                                                          height




                                   border
                                   padding
   ļ¬xed margin          width
                                Content Area
                                                 height
                                                                                          Fixed width
Element Display Roles - Inline Level
 Inline-level is a element with property display: inline
 It generate element box within a line of text and do not
 break up the ļ¬‚ow of that line, continues layout
 The box size is determined by itā€™s content
 inline element can only contain inline element
 Margin has no effect here
 line-height and vertical-align
 inline-height, inline-width (not recommended)
 font-size
Inline-Level Layout

content
 area           inline element              inline box


              content area   half-leading


  which is   Strongly emphasized      and which is
Inline-Level Layout

content
 area           inline element              inline box


              content area   half-leading


  which is   Strongly emphasized       and which is


                                 baseline
Inline box formating

  The containing block
    which is   Strongly emphasized   which is

    beijing oepn party   is good
Normal layout ļ¬‚ow
Other Element Display Roles

Inline-block: it has no breaks, but you can speciļ¬c
width and height on it
display: none (totally hide the content, remove it from
layout ļ¬‚ow)
  about visibility: hide (do not display the content, but
  still take effect in layout ļ¬‚ow)
Steal from http://www.slideshare.net/stopsatgreen/the-home-of-tomorrow-css-layouts

Future Layout Modules
Steal from http://www.slideshare.net/stopsatgreen/the-home-of-tomorrow-css-layouts

Future Layout Modules
Steal from http://www.slideshare.net/stopsatgreen/the-home-of-tomorrow-css-layouts

Future Layout Modules
Steal from http://www.slideshare.net/stopsatgreen/the-home-of-tomorrow-css-layouts

Future Layout Modules
Steal from http://www.slideshare.net/stopsatgreen/the-home-of-tomorrow-css-layouts

Future Layout Modules
Control the layout
 Floating Layout            Absolute positioning
   Left, right ļ¬‚oat         Fixed positioning
   Clear ļ¬‚oat               z-index
   Shrink to ļ¬t           Table Layout
 Positioning Layout         Fixed table layout
   Static positioning       Automatic table layout
   Relative positioning
Values and Units
Color Values                  Length Values
  #RRGGBB                       Absolute length units
  #RGB                            Inches (in)
  rgb(rrr.rr%, ggg.gg%,           Centimeters (cm)
  bbb.bb%)
                                  Millimeters (mm)
  rgb(rrr, ggg, bbb)
                                  Points (pt) 12pt = 1in
  keyword (black, blue ...)
                                  Picas (pc)
Values and Units
Length Values
  Relative length units
    em-height (em)
    x-height (ex)
    Pixels (px)
Percentage Values (%)
Agenda
XHTML & CSS
CSS selector
Visual formatting & models
Basic sample
Advanced sample
Tricks and hacks
CSS basic example
Style for font (size, weight, color, style, family)
Style for link
  love/hate
  rollover (spry)
Style for ļ¬‚oat image and clear
Style for background
Agenda
XHTML & CSS
CSS selector
Visual formatting & models
Basic sample
Advanced sample
Tricks and hacks
CSS Advanced example
Image button      rounded corner
horizontal menu     ļ¬xed width
css tooltip         mountain corner
slide door tab      4 wrapped bg images
                    4 corner images
                    css rounded corner
Agenda
XHTML & CSS
CSS selector
Visual formatting & models
Basic sample
Advanced sample
Tricks and hacks
Hacks and Tricks
Most hacks is for IE          Tricks for IE
  Star hack (6)                 min-width/width(6)
  Underscore hack (7)           <!--[if lte IE 7]>
  !important (6)                 <![endif]-->
  > child selector (-5, -6)
  property selector
  has-layout? zoom: 1
You are coming a long way,
baby
Thanks!

More Related Content

Similar to Css Essential

Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
ZahouAmel1
Ā 
Static layouts with css
Static layouts with cssStatic layouts with css
Static layouts with css
Dan Phiffer
Ā 
CSS Foundations, pt 2
CSS Foundations, pt 2CSS Foundations, pt 2
CSS Foundations, pt 2
Shawn Calvert
Ā 
Css training
Css trainingCss training
Css training
Leigh Aucoin
Ā 

Similar to Css Essential (20)

Web Layout
Web LayoutWeb Layout
Web Layout
Ā 
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Ā 
5. Web Technology CSS Advanced
5. Web Technology CSS Advanced 5. Web Technology CSS Advanced
5. Web Technology CSS Advanced
Ā 
Dimensions of elements.pdf
Dimensions of elements.pdfDimensions of elements.pdf
Dimensions of elements.pdf
Ā 
Static layouts with css
Static layouts with cssStatic layouts with css
Static layouts with css
Ā 
CSS
CSSCSS
CSS
Ā 
CSS.pptx
CSS.pptxCSS.pptx
CSS.pptx
Ā 
CSS and CSS3
CSS and CSS3CSS and CSS3
CSS and CSS3
Ā 
Box Model
Box ModelBox Model
Box Model
Ā 
Css box model
Css box modelCss box model
Css box model
Ā 
CSS Foundations, pt 2
CSS Foundations, pt 2CSS Foundations, pt 2
CSS Foundations, pt 2
Ā 
Web Development - Lecture 6
Web Development - Lecture 6Web Development - Lecture 6
Web Development - Lecture 6
Ā 
Html5
Html5Html5
Html5
Ā 
Responsive web design
Responsive web designResponsive web design
Responsive web design
Ā 
Lecture-8.pptx
Lecture-8.pptxLecture-8.pptx
Lecture-8.pptx
Ā 
Concept of CSS part 2
Concept of CSS part 2Concept of CSS part 2
Concept of CSS part 2
Ā 
Accessibility and css - Lisa Seeman
Accessibility and css - Lisa SeemanAccessibility and css - Lisa Seeman
Accessibility and css - Lisa Seeman
Ā 
Css training
Css trainingCss training
Css training
Ā 
Cascading Style Sheets - Part 01
Cascading Style Sheets - Part 01Cascading Style Sheets - Part 01
Cascading Style Sheets - Part 01
Ā 
Working-With-The-Box-Model-Lesson-5.pptx
Working-With-The-Box-Model-Lesson-5.pptxWorking-With-The-Box-Model-Lesson-5.pptx
Working-With-The-Box-Model-Lesson-5.pptx
Ā 

Recently uploaded

Recently uploaded (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
Ā 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Ā 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
Ā 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
Ā 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Ā 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
Ā 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
Ā 
šŸ¬ The future of MySQL is Postgres šŸ˜
šŸ¬  The future of MySQL is Postgres   šŸ˜šŸ¬  The future of MySQL is Postgres   šŸ˜
šŸ¬ The future of MySQL is Postgres šŸ˜
Ā 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
Ā 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
Ā 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
Ā 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
Ā 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
Ā 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
Ā 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
Ā 
Scaling API-first ā€“ The story of a global engineering organization
Scaling API-first ā€“ The story of a global engineering organizationScaling API-first ā€“ The story of a global engineering organization
Scaling API-first ā€“ The story of a global engineering organization
Ā 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
Ā 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
Ā 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
Ā 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Ā 

Css Essential

  • 1. CSS Essentials For the one who care about layout Tin@BrowBag 3 June 2011
  • 2. Agenda XHTML & CSS CSS selector Visual formatting & models Basic sample Advanced sample Tricks and hacks
  • 3. CSS deļ¬ne the visual model Layout Typography Units Rendering Graphics etc.
  • 4. Era of CSS Before the movable- Moden publishing dawn type CSS 3
  • 5. Agenda XHTML & CSS CSS selector Visual formatting & models Basic sample Advanced sample Tricks and hacks
  • 6. XHTML and CSS XHTML => data (structure) CSS => presentation (visual) Separation of concerns Best practices: Use proper HTML tags Use meaningful class/id name (red-text warn-text) Minimizing HTML structure and CSS rules
  • 8. Agenda XHTML & CSS CSS selector Visual formatting & models Basic sample Advanced sample Tricks and hacks
  • 9. CSS selector - Rule Structure Selector Declaration block Declaration Declaration H1 { color: red; background: yellow; } Property Value Property Value
  • 10. CSS selector - Basic Element Selector Type selector: h1 { font-weight: bold;} Descendant selector: li a { text-decoration: none; } Class Selector .warn { color: red } .full-width { width: 100% }
  • 11. CSS selector - Basic ID Selector #sidebar { ļ¬‚oat: right; width: 27em; } Pseudo class a:link { color: blue; } li:hover { background-color: grey; } input:focus { background-color: yellow; } All pseudo class: :active, :after, :before, :ļ¬rst-child, :ļ¬rst-letter, :ļ¬rst- line, :focus, :hover, :lang, :link, :visited
  • 12. CSS selector - advanced Universal (wildcard) Selector * { padding: 0; margin: 0; } Child selector: #nav > li Adjacent Sibling selector: h1 + p Simple Attribute selector: div[class] input[type=ā€inputā€], div[id~=ā€containerā€] ...
  • 13. CSS Rule Speciļ¬city (Weight) Four level of speciļ¬city level 1(1000): inline style, <div style=ā€color: redā€> level 2(0100): ID selector level 3(0010): class, pseudo class, attribute selector level 4(0001): element selector, universal selector Special level: !important (except IE6) Draw game: last declaration win
  • 14. CSS Rule Speciļ¬city Rule Weight Weight (digit) Style=ā€ā€ 1, 0, 0, 0 1000 #wrapped #content {} 0, 2, 0, 0 200 #content .date {} 0, 1, 1, 0 110 div#content {} 0, 1, 0, 1 101 #content {} 0, 1, 0, 0 100 p.comment .date {} 0, 0, 2, 1 21 p.comment {} 0,0, 1, 1 11 div p {} 0, 0, 0, 2 2 p {} 0, 0, 0, 1 1
  • 15. CSS: Inherit and cascading Inheritance: Inherit ancestor elementā€™s style, color, font-size (font*) descendants in dom tree inherit ancestorā€™s style none inherit: padding, margin, border, background no speciļ¬city (lowest priority)
  • 16. CSS: Inherit and cascading Cascading: different level of css rule composite together all match selector declarations will be applied browser default style Inheritance selector declarations from lower to higher speciļ¬city the styles with !important later property overwrite former property
  • 17. How to use them?
  • 18. Real example (by Firebug)
  • 19. Agenda XHTML & CSS CSS selector Visual formatting & models Basic sample Advanced sample Tricks and hacks
  • 20. Element Classiļ¬cation Nonreplaced Elements The majority of HTML elements are NE Their content box is generate by itself Replaced Elements content box is replaced by something not directly represented by document content Image, ļ¬‚ash object, input element
  • 21. Everything start form the ā€˜displayā€™ model ā€œThe display property speciļ¬es the type of box an element should generate.ā€
  • 22. Era of CSS Before the movable- Moden publishing dawn type CSS 3
  • 24. Basic Box model margin: top right bottom left; border padding width Content Area height
  • 25. Basic Box model Background margin: top right bottom left; border padding width Content Area height
  • 26. Box model example (in ļ¬rebug)
  • 27. IE box model quirks W3C Actual width = margin * 2 + padding*2 + border * 2 + width (css property) content-width = width (css property) IE Actual width = margin * 2 + width (css property) content-width = width - padding * 2 This ļ¬le is licensed under the CreativeĀ Commons AttributionĀ ShareAlikeĀ 3.0Ā Unported (http://en.wikipedia.org/wiki/Image:W3C_and_Internet_Explorer_box_models.png)
  • 28. So... for IE compatibility Normally, donā€™t use padding and margin on same element, use it in different level Make IE doesn't work in quirks-mode Has-layout=true (zoom: 1, but canā€™t pass w3c validation) Donā€™t use width: 100% and padding on same element (for safty, use 95% or other safe value)
  • 29. Element Display Roles - Block Level Block-Level is a element with property display: block It generate a box ļ¬lls its parentā€™s content area canā€™t have other element on itā€™s side it generate breaks before/after itā€™s box Use width/height to determine the size min-width/max-width Div is block element by default Use overļ¬‚ow control overļ¬‚ow content display/hide
  • 30. Block-Level Layout It generate a rectangular box called element box, which describes the amount of space occupied by an element Background extends to the outer edge of the border Only margins, height, and width may be set to auto Only margins can be given negative values Padding & borders of element box default to 0 & none Width property deļ¬ne only the width of content area
  • 31. Block box formating margin: top right bottom left; border padding width Content Area height
  • 32. Block box formating The containing block border padding auto margin width Content Area height negative margin border padding width Content Area height border padding ļ¬xed margin width Content Area height Fixed width
  • 33. Element Display Roles - Inline Level Inline-level is a element with property display: inline It generate element box within a line of text and do not break up the ļ¬‚ow of that line, continues layout The box size is determined by itā€™s content inline element can only contain inline element Margin has no effect here line-height and vertical-align inline-height, inline-width (not recommended) font-size
  • 34. Inline-Level Layout content area inline element inline box content area half-leading which is Strongly emphasized and which is
  • 35. Inline-Level Layout content area inline element inline box content area half-leading which is Strongly emphasized and which is baseline
  • 36. Inline box formating The containing block which is Strongly emphasized which is beijing oepn party is good
  • 38. Other Element Display Roles Inline-block: it has no breaks, but you can speciļ¬c width and height on it display: none (totally hide the content, remove it from layout ļ¬‚ow) about visibility: hide (do not display the content, but still take effect in layout ļ¬‚ow)
  • 44. Control the layout Floating Layout Absolute positioning Left, right ļ¬‚oat Fixed positioning Clear ļ¬‚oat z-index Shrink to ļ¬t Table Layout Positioning Layout Fixed table layout Static positioning Automatic table layout Relative positioning
  • 45. Values and Units Color Values Length Values #RRGGBB Absolute length units #RGB Inches (in) rgb(rrr.rr%, ggg.gg%, Centimeters (cm) bbb.bb%) Millimeters (mm) rgb(rrr, ggg, bbb) Points (pt) 12pt = 1in keyword (black, blue ...) Picas (pc)
  • 46. Values and Units Length Values Relative length units em-height (em) x-height (ex) Pixels (px) Percentage Values (%)
  • 47. Agenda XHTML & CSS CSS selector Visual formatting & models Basic sample Advanced sample Tricks and hacks
  • 48. CSS basic example Style for font (size, weight, color, style, family) Style for link love/hate rollover (spry) Style for ļ¬‚oat image and clear Style for background
  • 49. Agenda XHTML & CSS CSS selector Visual formatting & models Basic sample Advanced sample Tricks and hacks
  • 50. CSS Advanced example Image button rounded corner horizontal menu ļ¬xed width css tooltip mountain corner slide door tab 4 wrapped bg images 4 corner images css rounded corner
  • 51. Agenda XHTML & CSS CSS selector Visual formatting & models Basic sample Advanced sample Tricks and hacks
  • 52. Hacks and Tricks Most hacks is for IE Tricks for IE Star hack (6) min-width/width(6) Underscore hack (7) <!--[if lte IE 7]> !important (6) <![endif]--> > child selector (-5, -6) property selector has-layout? zoom: 1
  • 53. You are coming a long way, baby

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n
  48. \n
  49. \n
  50. \n
  51. \n