Your SlideShare is downloading. ×
  • Like
CSS Fundamentals
Upcoming SlideShare
Loading in...5

Thanks for flagging this SlideShare!

Oops! An error has occurred.


Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

CSS Fundamentals


Fundamentals of CSS covering the different types of tags and

Fundamentals of CSS covering the different types of tags and

Published in Technology , Education
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
No Downloads


Total Views
On SlideShare
From Embeds
Number of Embeds



Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

    No notes for slide
  • The link tag establishes relationships between the current document and other documents. It is almost always used to specify external style sheets. The rel attribute defines the type of relationship. The type attribute specifies the MIME type (the format of the text file) and the href attribute, the location of the file.
  • DOM (Document Object Model)


  • 1. CSS Fundamentals
  • 2. What is CSS?
    • Cascading Style Sheets
    • Rules that define how HTML elements should look
    • body {background:black;}
    • Cascades part determines the order the rules are applied in
  • 3. Types of Style Sheets
    • Browser -Applies some styles by default
    • User -Some browsers allow you to create your own styles.
    • Author -Websites can also have style sheets...these are the ones you'll be doing.
  • 4.
    • selectors select elements to be styled
    • declaration tells browser how to style
    • property is what you want to modify
    • value is the option you want for the property
    What does it look like?
      • <style>
        • em { color:red; font-weight:bold; }
      • </style>
      • declaration
      • selector
      • property
      • value
  • 5. Where does CSS go
    • Inline style=&quot;&quot; attribute - Only good for one tag
    • Embedded <style> - Good for the whole page
    • External <link rel=&quot;stylesheet&quot; href=&quot;&quot; /> - Many Pages
  • 6.
    • When you need to share code
    • Only affects a specific tag
    Inline <em style=&quot;color:red;&quot;>dog</em>
  • 7.
    • Uses the <style> tag
    • Affects the current page
    • Uses selectors to specify which tags to affect
      • <style> em { color: green; font-size:18px;} </style>
  • 8.
    • Can affect a multitude of documents
    • Uses a separate file that must be linked to
    • The CSS file does NOT need <STYLE> tag
    External <link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;my.css&quot; />
  • 9. HTML Color Modes
    • Can use Color Names like Black, Red, Blue
    • Can use Red, Green and Blue values from Photoshop
    • To be more specific, use Hexadecimal codes #FFCC00
    • Can be shortened to three letters if they're the same #FC0
    • Newer browsers can use rgba(0,0,0,0.5);
  • 10.
    • Children inherit styles from parent
    • BODY is the big daddy
    Inheritance body { font-family:verdana; } p { font-size:10px;}
    • Which rules take over when there's more than one
    • Browsers always deal with multiple style sheets
    • Browser/User/Author style sheet/External/embedded/inline
    • If two rules conflict, generally the later rule wins
    <style>em { color: red; }</style> <p>The quick <em style=&quot;color:green;&quot;>fox</em>.</p>
  • 12. Common Selectors
    • Type Selectors: em {color: blue; }
    • Class Selectors: .wrapper {background-color: #CFC;}
    • ID Selectors: #content {width:960px;}
    • Descendant Selectors: p em {color:red;}
  • 13. Advanced Selectors
    • Child Selectors: div>em {color:red;}
    • Universal Selector: * {color:red;}
    • Adjacent Sibling: h1+h3 {color:red;}
    • Attribute Selectors: a[href=&quot;&quot;],img[alt] {color:red;}
  • 14. Clean HTML is Crucial
    • DOM (Document Object Model)
    • The Order of Things
  • 15. Pseudo Elements
    • Pseudo Classes: :hover,:first-child
    • Pseudo Elements: :first-line, :first-letter
    • Insertion Elements: :before, :after
  • 16. Multiple Class Selectors
    • You can combine multiple classes by separating them by spaces &quot;wrapper mod&quot;
  • 17. Class Shortcuts
    • Font
    • Background
    • Border
  • 18. The generic Tags
    • Span-Inline
    • DIV-Block Level
  • 19. The Box Model
    • Inline vs Block
    • Margin
    • Border
    • Padding
  • 20. Floating
    • To the Right or to the Left
    • The container problem
    • Fixing it with the mod class in html5reset
  • 21. Positioning
    • Static-Normal positioning of objects
    • Fixed-Fixed to the browser window
    • Relative-Relative to it's current position, but can be moved
    • Absolute-Relative to the last relatively positioned object, if one is not present, then works like Fixed...relative to the window.
    • Z-index
  • 22. The End