SlideShare a Scribd company logo
Style
Blogging with



         An Introduction to CSS

Presented by Anthony Piraino at ConvergeSouth 2008
What is CSS and
why should I learn it?
BloggingWithStyle_2008
Your Blog: Under the Hood
HTML vs. CSS
HTML
   HyperText Markup Language


Describes the semantics and structure
       of content on a web page.
CSS
         Cascading Style Sheets


   Describes the presentation of content
on a web page by defining design elements
       such as layout, fonts, and colors.
BloggingWithStyle_2008
BloggingWithStyle_2008
BloggingWithStyle_2008
BloggingWithStyle_2008
BloggingWithStyle_2008
BloggingWithStyle_2008
BloggingWithStyle_2008
BloggingWithStyle_2008
BloggingWithStyle_2008
BloggingWithStyle_2008
BloggingWithStyle_2008
How do they work together?


     CSS lets you define visual styling by
targeting rules to individual HTML elements.
<html>
         <body>
           <h1>This is a header</h1>
           <p>
              Here is a block of
              paragraph text, blah
              blah blah etc.
HTML       </p>
           <h2>Another header</h2>
           <p>
              And yet another paragraph
              with a block of text.
           </p>
         </body>
       </html>
body {
        font-family: "trebuchet ms", sans-serif;
        background-color: #ddeedd;
        padding: 20px 100px 0px 100px;
        }
      h1, h2 {
        font-size: 1.8em;
        color: #88aa44;
        margin: 0px;

CSS
        }
      h2 {
        font-size: 1.4em;
        background-color: #ffffff;
        padding: 0px 30px 0px 30px;
        }
      p {
        background-color: #ffffff;
        padding: 30px;
        margin: 0px;
        }
BloggingWithStyle_2008
BloggingWithStyle_2008
body {
                                   font-family: "trebuchet ms", sans-serif;
<body>                             background-color: #ddeedd;
                                   padding: 20px 100px 0px 100px;
  <h1>This is a header</h1>        }

  <p>                            h1, h2 {
     Here is a block of            font-size: 1.8em;
     paragraph text, blah          color: #88aa44;
     blah blah etc.                margin: 0px;
  </p>                             }

                                 h2 {
  <h2>Another header</h2>          font-size: 1.4em;
                                   background-color: #ffffff;
  <p>                              padding: 0px 30px 0px 30px;
     And yet another paragraph     }
     with a block of text.
  </p>                           p {
                                   background-color: #ffffff;
</body>                            padding: 30px;
                                   margin: 0px;
                                   }




          HTML                                    CSS
CSS Syntax

A stylesheet lists rules for presentation.


 Each rule consists of a selector and a
          declaration block.
selector { property: value; }
The Type Selector


p {
 color: #1662d8;
 background-color: #ffffff;
 padding: 10px;
 border: 5px solid #1bc8fe;
 }
Here is an example paragraph with a
styled font, color, padding and border.




           p {
            color: #1662d8;
            background-color: #ffffff;
            padding: 10px;
            border: 5px solid #1bc8fe;
            }
The Class Selector
<p>
   This is a normal paragraph, nothing
   exciting going on here.
</p>
<p class=”alert”>
   But this is a really important
   paragraph - pay attention!
</p>
p {
 color: gray;
 font-size: 12px;
 }


p.alert {
 color: red;
 font-size: 18px;
 font-weight: bold;
 }
This is a normal paragraph, nothing
exciting going on here.


But this is a really important
paragraph - pay attention!
The ID Selector
HTML   <ul id=”contents”>
          <li>Chapter 1</li>
          <li>Chapter 2</li>
          <li>Chapter 3</li>
       </ul>


 CSS   #contents {
          font-weight: bold;
          font-size: 18px;
          }
Descendant Selectors
<p>
   This is a stand-alone paragraph.
</p>
<blockquote>
  <p>
     A paragraph inside our blockquote.
  </p>
  <p>
     And another blockquoted paragraph.
  </p>
</blockquote>
blockquote p {
 color: blue;
 font-weight: bold;
 border-left: 3px solid blue;
 padding-left: 10px;
 }
This is a stand-alone paragraph.

 A paragraph inside our
 blockquote.
 And another blockquoted
 paragraph.
{ The Declaration Block }
Properties and Values



       Value of my House
 Jan   Feb   March   April   May   June
Properties and Values


  selector {
    property: value;
    property: value;
    }
color
By Name


   aqua, black, blue, fuchsia, gray, etc.


        Full list of supported color names:
http://www.w3schools.com/css/css_colornames.asp
By Hex Value


Roses are #ff0000
Violets are #0000ff
Red   Green   Blue

#00 00 00
http://www.colorpicker.com/
background-color
margin
padding
border
The Box Model


   element
    padding
     border
    margin
Margin and Padding Values


margin: 0px 20px 10px 20px;

        top   right bottom   left
Pimp my CSS
BloggingWithStyle_2008
BloggingWithStyle_2008
BloggingWithStyle_2008
#outer-wrapper {
  width: 660px;
  margin:0 auto;
  padding:10px;
  text-align:$startSide;
  font: $bodyfont;
  }
#outer-wrapper
#outer-wrapper {
  width: 660px;
  margin:0 auto;
  padding: 10px;
  text-align:$startSide;
  font: $bodyfont;
  }
#outer-wrapper {
  width: 660px;
  margin:0 auto;
  padding: 10px 40px 10px 40px;
  text-align:$startSide;
  font: $bodyfont;
  }
#outer-wrapper {
  width: 660px;
  margin:0 auto;
  padding: 10px 40px 10px 40px;
  text-align:$startSide;
  font: $bodyfont;
  background-color: #effcff;
  border-left: 10px solid #003;
  border-right: 10px solid #003;
  }
BloggingWithStyle_2008
BloggingWithStyle_2008
#header-wrapper {
  width:660px;
  margin:0 auto 10px;
  border:1px solid $bordercolor;
  }
#header {
  margin: 5px;
  border: 1px solid $bordercolor;
  text-align: center;
  color:$pagetitlecolor;
  }
#header h1 {
  margin:5px 5px 0;
  padding:15px 20px .25em;
  line-height:1.2em;
  text-transform:uppercase;
  letter-spacing:.2em;
  font: $pagetitlefont;
  }
#header-wrapper



                  #header



                            #header h1
#header-wrapper



                  #header



                            #header h1
#header-wrapper



                  #header



                            #header h1
#header-wrapper



                  #header



                            #header h1
#header-wrapper {
  width:660px;
  margin:0 auto 10px;
  border:1px solid $bordercolor;
  }
#header {
  margin: 5px;
  border: 1px solid $bordercolor;
  text-align: center;
  color:$pagetitlecolor;
  }
#header h1 {
  margin:5px 5px 0;
  padding:15px 20px .25em;
  line-height:1.2em;
  text-transform:uppercase;
  letter-spacing:.2em;
  font: $pagetitlefont;
  }
#header-wrapper {
  width:660px;
  margin:0 auto 10px;
  border:1px solid $bordercolor;
  }
#header {
  margin: 5px;
  border: 1px solid $bordercolor;
  text-align: center;
  color:$pagetitlecolor;
  }
#header h1 {
  margin:5px 5px 0;
  padding:15px 20px .25em;
  line-height:1.2em;
  text-transform:uppercase;
  letter-spacing:.2em;
  font: $pagetitlefont;
  }
#header-wrapper {
  width:660px;
  margin: 0px 0px 20px 0px;
  border:1px solid $bordercolor;
  }
#header {
  margin: 5px;
  border: 1px solid $bordercolor;
  text-align: center;
  color:$pagetitlecolor;
  }
#header h1 {
  margin:5px 5px 0;
  padding:15px 20px .25em;
  line-height:1.2em;
  text-transform:uppercase;
  letter-spacing:.2em;
  font: $pagetitlefont;
  }
#header-wrapper {
  width:660px;
  margin: 0px 0px 20px 0px;
  border-bottom: 1px solid #c1cccf;
  }
#header {
  margin: 5px;
  border: 1px solid $bordercolor;
  text-align: center;
  color:$pagetitlecolor;
  }
#header h1 {
  margin:5px 5px 0;
  padding:15px 20px .25em;
  line-height:1.2em;
  text-transform:uppercase;
  letter-spacing:.2em;
  font: $pagetitlefont;
  }
#header-wrapper {
  width:660px;
  margin: 0px 0px 20px 0px;
  border-bottom: 1px solid #c1cccf;
  }
#header {



  color:$pagetitlecolor;
  }
#header h1 {
  margin:5px 5px 0;
  padding:15px 20px .25em;
  line-height:1.2em;
  text-transform:uppercase;
  letter-spacing:.2em;
  font: $pagetitlefont;
  }
#header-wrapper {
  width:660px;
  margin: 0px 0px 20px 0px;
  border-bottom: 1px solid #c1cccf;
  }
#header {
  color: #000033;
  }



#header h1 {
  margin:5px 5px 0;
  padding:15px 20px .25em;
  line-height:1.2em;
  text-transform:uppercase;
  letter-spacing:.2em;
  font: $pagetitlefont;
  }
#header-wrapper {
  width:660px;
  margin: 0px 0px 20px 0px;
  border-bottom: 1px solid #c1cccf;
  }
#header {
  color: #000033;
  }



#header h1 {
  margin: 0px;
  padding:15px 20px .25em;
  line-height:1.2em;
  text-transform:uppercase;
  letter-spacing:.2em;
  font: $pagetitlefont;
  }
#header-wrapper {
  width:660px;
  margin: 0px 0px 20px 0px;
  border-bottom: 1px solid #c1cccf;
  }
#header {
  color: #000033;
  }



#header h1 {
  margin: 0px;
  padding: 30px 0px 0px 0px;
  line-height:1.2em;
  text-transform:uppercase;
  letter-spacing:.2em;
  font: $pagetitlefont;
  }
BloggingWithStyle_2008
BloggingWithStyle_2008
.sidebar .widget, .main .widget {
  border-bottom:1px dotted $bordercolor;
  margin:0 0 1.5em;
  padding:0 0 1.5em;
 }
.sidebar .widget, .main .widget {
  margin:0 0 1.5em;
  padding:0 0 1.5em;
 }
.sidebar .widget, .main .widget {
  margin:0px;
  padding:0 0 1.5em;
 }
.sidebar .widget, .main .widget {
  margin:0px;
  padding:0 0 1.5em;
 }


#sidebar-wrapper h2 {
  background-color: #113355;
  padding: 3px 0px 3px 5px;
  color: #ffffff;
 }
BloggingWithStyle_2008
BloggingWithStyle_2008
BloggingWithStyle_2008
Resources and Next Steps

              Selectutorial
 http://css.maxdesign.com.au/selectutorial/

      W3Schools CSS Tutorial
     http://www.w3schools.com/css/

           CSS Zen Garden
      http://www.csszengarden.com/
</slideshow >

More Related Content

PPTX
Software programming tools for creating/managing CSS files
Dinu Suman
 
KEY
ID01 / W01
mkontopo
 
PDF
Mobile-first OOCSS, Sass & Compass at BBC Responsive News
Kaelig Deloumeau-Prigent
 
TXT
Theme 23
bellaandzendaya
 
Software programming tools for creating/managing CSS files
Dinu Suman
 
ID01 / W01
mkontopo
 
Mobile-first OOCSS, Sass & Compass at BBC Responsive News
Kaelig Deloumeau-Prigent
 
Theme 23
bellaandzendaya
 

What's hot (19)

KEY
Simplifying CSS With Sass
Thomas Reynolds
 
PDF
Sassive Aggressive: Using Sass to Make Your Life Easier (NSWG Version)
Adam Darowski
 
KEY
Organizing & Simplifying CSS [with Sass]
Matt Puchlerz
 
KEY
Stylesheets of the future with Sass and Compass
Dave Ross
 
PPTX
Css & css3
isha
 
PDF
Client Side Performance In Web Applications Resources
vladungureanu
 
PDF
Work and play with SASS & Compass
Andreas Dantz
 
PDF
Sending E-mail that reaches the destination using PHP
Manuel Lemos
 
PPTX
Xlrays online web tutorials
Yogesh Gupta
 
PDF
The Ring programming language version 1.10 book - Part 55 of 212
Mahmoud Samir Fayed
 
PPT
Basic html tags
Venkat Pinagadi
 
PPTX
Supercharged HTML & CSS
Max Kraszewski
 
PPTX
Css frameworks
Dimitar Belchugov
 
PDF
Class 2: CSS Selectors, Classes & Ids
Erika Tarte
 
PPTX
html
MeKwang Kreng
 
PDF
SASS In The Real World
fesuffolk
 
PDF
The Ring programming language version 1.5.3 book - Part 45 of 184
Mahmoud Samir Fayed
 
PDF
Content style in html with example - PhpGurukul Tutorials
PHPGurukul Blog
 
PDF
CSS preprocessor: why and how
mirahman
 
Simplifying CSS With Sass
Thomas Reynolds
 
Sassive Aggressive: Using Sass to Make Your Life Easier (NSWG Version)
Adam Darowski
 
Organizing & Simplifying CSS [with Sass]
Matt Puchlerz
 
Stylesheets of the future with Sass and Compass
Dave Ross
 
Css & css3
isha
 
Client Side Performance In Web Applications Resources
vladungureanu
 
Work and play with SASS & Compass
Andreas Dantz
 
Sending E-mail that reaches the destination using PHP
Manuel Lemos
 
Xlrays online web tutorials
Yogesh Gupta
 
The Ring programming language version 1.10 book - Part 55 of 212
Mahmoud Samir Fayed
 
Basic html tags
Venkat Pinagadi
 
Supercharged HTML & CSS
Max Kraszewski
 
Css frameworks
Dimitar Belchugov
 
Class 2: CSS Selectors, Classes & Ids
Erika Tarte
 
SASS In The Real World
fesuffolk
 
The Ring programming language version 1.5.3 book - Part 45 of 184
Mahmoud Samir Fayed
 
Content style in html with example - PhpGurukul Tutorials
PHPGurukul Blog
 
CSS preprocessor: why and how
mirahman
 
Ad

Viewers also liked (7)

PDF
CombustionREFlexMorphing
tutorialsruby
 
PDF
instaling
tutorialsruby
 
PDF
skintutorial
tutorialsruby
 
PDF
web%20design-08-fall
tutorialsruby
 
PDF
Jonny_Martin-Asterisk
tutorialsruby
 
PPTX
How States Can Support Transformation in Tough Times
Education Resource Strategies
 
PPTX
Rennie Center Presentation
Education Resource Strategies
 
CombustionREFlexMorphing
tutorialsruby
 
instaling
tutorialsruby
 
skintutorial
tutorialsruby
 
web%20design-08-fall
tutorialsruby
 
Jonny_Martin-Asterisk
tutorialsruby
 
How States Can Support Transformation in Tough Times
Education Resource Strategies
 
Rennie Center Presentation
Education Resource Strategies
 
Ad

Similar to BloggingWithStyle_2008 (20)

PPT
Estilos Css
andreagonza26
 
PPTX
css-note.pptx
Samay16
 
DOCX
Bloggdesign #2 - hawaa.blogg.no
Hannee92
 
DOCX
JavaScript Week 10CSSstyle.cssbody { background-colo.docx
priestmanmable
 
PPTX
Css tips & tricks
anubavam-techkt
 
PPT
cascading style sheet ppt
abhilashagupta
 
DOC
Css 1
H K
 
DOC
Simple Blue Blog Template XML 的副本
a5494535
 
PDF
css-ppt.pdf
EktaDesai14
 
PDF
CSCADING style sheet. Internal external inline
Ranjeet Reddy
 
DOCX
Week ThreeExpress Holidayscssstyle.csshtml{ height 100.docx
philipnelson29183
 
PPT
CSS Basics
WordPress Memphis
 
TXT
Tmx9
Lukas Mickosz
 
DOC
Theme futura suicida não use como base e nem copie
Rafaela Souza
 
DOC
Theme futura suicida não use como base e nem copie
Rafaela Souza
 
PDF
Css presentation introdution with sample basic projects
Digital Shende
 
PDF
cascadingstylesheets
tutorialsruby
 
PDF
cascadingstylesheets
tutorialsruby
 
PPT
Introduction to css by programmerblog.net
Programmer Blog
 
Estilos Css
andreagonza26
 
css-note.pptx
Samay16
 
Bloggdesign #2 - hawaa.blogg.no
Hannee92
 
JavaScript Week 10CSSstyle.cssbody { background-colo.docx
priestmanmable
 
Css tips & tricks
anubavam-techkt
 
cascading style sheet ppt
abhilashagupta
 
Css 1
H K
 
Simple Blue Blog Template XML 的副本
a5494535
 
css-ppt.pdf
EktaDesai14
 
CSCADING style sheet. Internal external inline
Ranjeet Reddy
 
Week ThreeExpress Holidayscssstyle.csshtml{ height 100.docx
philipnelson29183
 
CSS Basics
WordPress Memphis
 
Theme futura suicida não use como base e nem copie
Rafaela Souza
 
Theme futura suicida não use como base e nem copie
Rafaela Souza
 
Css presentation introdution with sample basic projects
Digital Shende
 
cascadingstylesheets
tutorialsruby
 
cascadingstylesheets
tutorialsruby
 
Introduction to css by programmerblog.net
Programmer Blog
 

More from tutorialsruby (20)

PDF
&lt;img src="../i/r_14.png" />
tutorialsruby
 
PDF
TopStyle Help &amp; &lt;b>Tutorial&lt;/b>
tutorialsruby
 
PDF
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>
tutorialsruby
 
PDF
&lt;img src="../i/r_14.png" />
tutorialsruby
 
PDF
&lt;img src="../i/r_14.png" />
tutorialsruby
 
PDF
Standardization and Knowledge Transfer – INS0
tutorialsruby
 
PDF
xhtml_basics
tutorialsruby
 
PDF
xhtml_basics
tutorialsruby
 
PDF
xhtml-documentation
tutorialsruby
 
PDF
xhtml-documentation
tutorialsruby
 
PDF
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
tutorialsruby
 
PDF
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
tutorialsruby
 
PDF
HowTo_CSS
tutorialsruby
 
PDF
HowTo_CSS
tutorialsruby
 
PDF
BloggingWithStyle_2008
tutorialsruby
 
PDF
Winter%200405%20-%20Advanced%20Javascript
tutorialsruby
 
PDF
Winter%200405%20-%20Advanced%20Javascript
tutorialsruby
 
PDF
eng2u3less38
tutorialsruby
 
&lt;img src="../i/r_14.png" />
tutorialsruby
 
TopStyle Help &amp; &lt;b>Tutorial&lt;/b>
tutorialsruby
 
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>
tutorialsruby
 
&lt;img src="../i/r_14.png" />
tutorialsruby
 
&lt;img src="../i/r_14.png" />
tutorialsruby
 
Standardization and Knowledge Transfer – INS0
tutorialsruby
 
xhtml_basics
tutorialsruby
 
xhtml_basics
tutorialsruby
 
xhtml-documentation
tutorialsruby
 
xhtml-documentation
tutorialsruby
 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
tutorialsruby
 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
tutorialsruby
 
HowTo_CSS
tutorialsruby
 
HowTo_CSS
tutorialsruby
 
BloggingWithStyle_2008
tutorialsruby
 
Winter%200405%20-%20Advanced%20Javascript
tutorialsruby
 
Winter%200405%20-%20Advanced%20Javascript
tutorialsruby
 
eng2u3less38
tutorialsruby
 

Recently uploaded (20)

PDF
agentic-ai-and-the-future-of-autonomous-systems.pdf
siddharthnetsavvies
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PDF
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
PDF
This slide provides an overview Technology
mineshkharadi333
 
PDF
Doc9.....................................
SofiaCollazos
 
PPTX
ChatGPT's Deck on The Enduring Legacy of Fax Machines
Greg Swan
 
PDF
Software Development Methodologies in 2025
KodekX
 
PDF
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
AVTRON Technologies LLC
 
PDF
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
PPTX
The Power of IoT Sensor Integration in Smart Infrastructure and Automation.pptx
Rejig Digital
 
PDF
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
PDF
NewMind AI Monthly Chronicles - July 2025
NewMind AI
 
PPTX
Comunidade Salesforce São Paulo - Desmistificando o Omnistudio (Vlocity)
Francisco Vieira Júnior
 
PDF
Chapter 2 Digital Image Fundamentals.pdf
Getnet Tigabie Askale -(GM)
 
PDF
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
AbdullahSani29
 
PDF
CIFDAQ's Teaching Thursday: Moving Averages Made Simple
CIFDAQ
 
PDF
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
PDF
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
PDF
Test Bank, Solutions for Java How to Program, An Objects-Natural Approach, 12...
famaw19526
 
agentic-ai-and-the-future-of-autonomous-systems.pdf
siddharthnetsavvies
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
This slide provides an overview Technology
mineshkharadi333
 
Doc9.....................................
SofiaCollazos
 
ChatGPT's Deck on The Enduring Legacy of Fax Machines
Greg Swan
 
Software Development Methodologies in 2025
KodekX
 
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
AVTRON Technologies LLC
 
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
The Power of IoT Sensor Integration in Smart Infrastructure and Automation.pptx
Rejig Digital
 
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
NewMind AI Monthly Chronicles - July 2025
NewMind AI
 
Comunidade Salesforce São Paulo - Desmistificando o Omnistudio (Vlocity)
Francisco Vieira Júnior
 
Chapter 2 Digital Image Fundamentals.pdf
Getnet Tigabie Askale -(GM)
 
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
AbdullahSani29
 
CIFDAQ's Teaching Thursday: Moving Averages Made Simple
CIFDAQ
 
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
Test Bank, Solutions for Java How to Program, An Objects-Natural Approach, 12...
famaw19526
 

BloggingWithStyle_2008

  • 1. Style Blogging with An Introduction to CSS Presented by Anthony Piraino at ConvergeSouth 2008
  • 2. What is CSS and why should I learn it?
  • 4. Your Blog: Under the Hood
  • 6. HTML HyperText Markup Language Describes the semantics and structure of content on a web page.
  • 7. CSS Cascading Style Sheets Describes the presentation of content on a web page by defining design elements such as layout, fonts, and colors.
  • 19. How do they work together? CSS lets you define visual styling by targeting rules to individual HTML elements.
  • 20. <html> <body> <h1>This is a header</h1> <p> Here is a block of paragraph text, blah blah blah etc. HTML </p> <h2>Another header</h2> <p> And yet another paragraph with a block of text. </p> </body> </html>
  • 21. body { font-family: "trebuchet ms", sans-serif; background-color: #ddeedd; padding: 20px 100px 0px 100px; } h1, h2 { font-size: 1.8em; color: #88aa44; margin: 0px; CSS } h2 { font-size: 1.4em; background-color: #ffffff; padding: 0px 30px 0px 30px; } p { background-color: #ffffff; padding: 30px; margin: 0px; }
  • 24. body { font-family: "trebuchet ms", sans-serif; <body> background-color: #ddeedd; padding: 20px 100px 0px 100px; <h1>This is a header</h1> } <p> h1, h2 { Here is a block of font-size: 1.8em; paragraph text, blah color: #88aa44; blah blah etc. margin: 0px; </p> } h2 { <h2>Another header</h2> font-size: 1.4em; background-color: #ffffff; <p> padding: 0px 30px 0px 30px; And yet another paragraph } with a block of text. </p> p { background-color: #ffffff; </body> padding: 30px; margin: 0px; } HTML CSS
  • 25. CSS Syntax A stylesheet lists rules for presentation. Each rule consists of a selector and a declaration block.
  • 27. The Type Selector p { color: #1662d8; background-color: #ffffff; padding: 10px; border: 5px solid #1bc8fe; }
  • 28. Here is an example paragraph with a styled font, color, padding and border. p { color: #1662d8; background-color: #ffffff; padding: 10px; border: 5px solid #1bc8fe; }
  • 29. The Class Selector <p> This is a normal paragraph, nothing exciting going on here. </p> <p class=”alert”> But this is a really important paragraph - pay attention! </p>
  • 30. p { color: gray; font-size: 12px; } p.alert { color: red; font-size: 18px; font-weight: bold; }
  • 31. This is a normal paragraph, nothing exciting going on here. But this is a really important paragraph - pay attention!
  • 32. The ID Selector HTML <ul id=”contents”> <li>Chapter 1</li> <li>Chapter 2</li> <li>Chapter 3</li> </ul> CSS #contents { font-weight: bold; font-size: 18px; }
  • 33. Descendant Selectors <p> This is a stand-alone paragraph. </p> <blockquote> <p> A paragraph inside our blockquote. </p> <p> And another blockquoted paragraph. </p> </blockquote>
  • 34. blockquote p { color: blue; font-weight: bold; border-left: 3px solid blue; padding-left: 10px; }
  • 35. This is a stand-alone paragraph. A paragraph inside our blockquote. And another blockquoted paragraph.
  • 36. { The Declaration Block }
  • 37. Properties and Values Value of my House Jan Feb March April May June
  • 38. Properties and Values selector { property: value; property: value; }
  • 39. color
  • 40. By Name aqua, black, blue, fuchsia, gray, etc. Full list of supported color names: http://www.w3schools.com/css/css_colornames.asp
  • 41. By Hex Value Roses are #ff0000 Violets are #0000ff
  • 42. Red Green Blue #00 00 00
  • 46. The Box Model element padding border margin
  • 47. Margin and Padding Values margin: 0px 20px 10px 20px; top right bottom left
  • 52. #outer-wrapper { width: 660px; margin:0 auto; padding:10px; text-align:$startSide; font: $bodyfont; }
  • 54. #outer-wrapper { width: 660px; margin:0 auto; padding: 10px; text-align:$startSide; font: $bodyfont; }
  • 55. #outer-wrapper { width: 660px; margin:0 auto; padding: 10px 40px 10px 40px; text-align:$startSide; font: $bodyfont; }
  • 56. #outer-wrapper { width: 660px; margin:0 auto; padding: 10px 40px 10px 40px; text-align:$startSide; font: $bodyfont; background-color: #effcff; border-left: 10px solid #003; border-right: 10px solid #003; }
  • 59. #header-wrapper { width:660px; margin:0 auto 10px; border:1px solid $bordercolor; } #header { margin: 5px; border: 1px solid $bordercolor; text-align: center; color:$pagetitlecolor; } #header h1 { margin:5px 5px 0; padding:15px 20px .25em; line-height:1.2em; text-transform:uppercase; letter-spacing:.2em; font: $pagetitlefont; }
  • 60. #header-wrapper #header #header h1
  • 61. #header-wrapper #header #header h1
  • 62. #header-wrapper #header #header h1
  • 63. #header-wrapper #header #header h1
  • 64. #header-wrapper { width:660px; margin:0 auto 10px; border:1px solid $bordercolor; } #header { margin: 5px; border: 1px solid $bordercolor; text-align: center; color:$pagetitlecolor; } #header h1 { margin:5px 5px 0; padding:15px 20px .25em; line-height:1.2em; text-transform:uppercase; letter-spacing:.2em; font: $pagetitlefont; }
  • 65. #header-wrapper { width:660px; margin:0 auto 10px; border:1px solid $bordercolor; } #header { margin: 5px; border: 1px solid $bordercolor; text-align: center; color:$pagetitlecolor; } #header h1 { margin:5px 5px 0; padding:15px 20px .25em; line-height:1.2em; text-transform:uppercase; letter-spacing:.2em; font: $pagetitlefont; }
  • 66. #header-wrapper { width:660px; margin: 0px 0px 20px 0px; border:1px solid $bordercolor; } #header { margin: 5px; border: 1px solid $bordercolor; text-align: center; color:$pagetitlecolor; } #header h1 { margin:5px 5px 0; padding:15px 20px .25em; line-height:1.2em; text-transform:uppercase; letter-spacing:.2em; font: $pagetitlefont; }
  • 67. #header-wrapper { width:660px; margin: 0px 0px 20px 0px; border-bottom: 1px solid #c1cccf; } #header { margin: 5px; border: 1px solid $bordercolor; text-align: center; color:$pagetitlecolor; } #header h1 { margin:5px 5px 0; padding:15px 20px .25em; line-height:1.2em; text-transform:uppercase; letter-spacing:.2em; font: $pagetitlefont; }
  • 68. #header-wrapper { width:660px; margin: 0px 0px 20px 0px; border-bottom: 1px solid #c1cccf; } #header { color:$pagetitlecolor; } #header h1 { margin:5px 5px 0; padding:15px 20px .25em; line-height:1.2em; text-transform:uppercase; letter-spacing:.2em; font: $pagetitlefont; }
  • 69. #header-wrapper { width:660px; margin: 0px 0px 20px 0px; border-bottom: 1px solid #c1cccf; } #header { color: #000033; } #header h1 { margin:5px 5px 0; padding:15px 20px .25em; line-height:1.2em; text-transform:uppercase; letter-spacing:.2em; font: $pagetitlefont; }
  • 70. #header-wrapper { width:660px; margin: 0px 0px 20px 0px; border-bottom: 1px solid #c1cccf; } #header { color: #000033; } #header h1 { margin: 0px; padding:15px 20px .25em; line-height:1.2em; text-transform:uppercase; letter-spacing:.2em; font: $pagetitlefont; }
  • 71. #header-wrapper { width:660px; margin: 0px 0px 20px 0px; border-bottom: 1px solid #c1cccf; } #header { color: #000033; } #header h1 { margin: 0px; padding: 30px 0px 0px 0px; line-height:1.2em; text-transform:uppercase; letter-spacing:.2em; font: $pagetitlefont; }
  • 74. .sidebar .widget, .main .widget { border-bottom:1px dotted $bordercolor; margin:0 0 1.5em; padding:0 0 1.5em; }
  • 75. .sidebar .widget, .main .widget { margin:0 0 1.5em; padding:0 0 1.5em; }
  • 76. .sidebar .widget, .main .widget { margin:0px; padding:0 0 1.5em; }
  • 77. .sidebar .widget, .main .widget { margin:0px; padding:0 0 1.5em; } #sidebar-wrapper h2 { background-color: #113355; padding: 3px 0px 3px 5px; color: #ffffff; }
  • 81. Resources and Next Steps Selectutorial http://css.maxdesign.com.au/selectutorial/ W3Schools CSS Tutorial http://www.w3schools.com/css/ CSS Zen Garden http://www.csszengarden.com/