SlideShare uma empresa Scribd logo
1 de 23
CSS Part II




LIS 3353 – Monday 4/2/12
Agenda

   IT News
    – E-paper
   Grading Updates
    – All are complete, I just need to upload to Blackboard
    – I'll post a zip file of a sample spreadsheet and
      explanations of grading rubrics for the group
      assignments
   Office hours Wednesday – from 2-3 instead of 10-12
   CSS – review and continuation
CSS - Review

   Cascading Style Sheet
   Separates CONTENT from DESIGN
   More efficient use of time and resources
   Selectors (the tag)
   Declarations (the design)
   4 rules for applying CSS to page
CSS – Internal/Embedded

   Style information is embedded into the HEAD element of
    page
   All formatting in one location, vs. each individual
    element/tag on the page needing its own stylistic
    information attached
   Good for small sites/pages

       <head>
       <style type="text/css">
       hr {color: red;}
       body {margin-left: 20px;}
       </style>
       </head>
CSS – External

   Style information is external to the webpage
   Code shows syntax for linking the webpage to
    an external CSS
   This page below will draw CSS/formatting
    information frm the yourstyle.css document.

    <head>
    <link rel="stylesheet" type="text/css" href="yourstyle.css" />
    </head>
CSS – Import

   This statement may be used in a CSS file or inside the STYLE element.
   You can combine importing with other methods
   All @import statements must occur at the start of the style sheet
   Any rules specified in the style sheets themselves override conflicting rules in the
    imported style sheets
   You can use as many style sheet files as you wish and override them with
    embedded styles

<style type="text/css">
     <!—
     @import url(pagestyle.css);
     ->
     </style>
CSS – Inline

   Least flexible
   requires each element to be tagged
    within the HTML coding of the page.

<p style="color:sienna;margin-left:20px">This
is a paragraph.
</p>
CSS Multiple Sheets

   Use multiple sheets to dictate
    formatting of a page
   If there are conflicts, the INTERNAL
    sheet takes precedence
   BE CAREFUL! Don't have conflicts!
CSS – Multiple Sheets

   EXTERNAL CSS (from @import or link
    href)
    h3 {color: red; text-align: right; font-size: 8pt}
   INTERNAL CSS
    h3 {text-align: center; font-size: 20pt}


   Result?
Index card!

   Name
   FSUID
   What is the result of the CSS question?
CSS – Multiple Sheets

   EXTERNAL CSS (from @import or link href)
    h3 {color: red; text-align: right; font-size: 8pt}
   INTERNAL CSS
    h3 {text-align: center; font-size: 20pt}


   Result?
    h3 {color: red; text-align: center; font-size: 20pt}
CSS – Multiple Sheets


   Author's        User's   Browser's
   style           style    style
   sheet           sheet    sheet




 Greatest weight            Least weight
CSS Basics

   Three parts
    – Selector (HTML tag you want to define)
    – Declaration (the style, consisting of:
        • Property (attribute of selector)
        • Value (markup value for that attribute)


body {color: black;}
p {font-family: "sans serif";}
p {text-align: left; color: red;}
h1, h2, h3, h4, h5, h6 {color: yellow;}
The class selector

   In CSS file:
     – p.right {text-align: right; }
     – p.left {text-align: left; }
     – p.center {text-align: center; }

   In HTML page:
     <p class="left">                 YOUR TEXT HERE
     Aligned LEFT</p>
     <p class="right">                             YOUR TEXT HERE
     Aligned RIGHT</p>
     <p class="center">                     YOUR TEXT HERE
     ALIGNED CENTER</p>
     <p class="right" class=“center”>
     ????</p>
The class selector
     You can create a class selector free of tag names if
      you want all tags to be formatted the same
       .center {text-align: center;}
     Any tag with the "center" class will be aligned
      center
     Can omit element name for selector if you wan tall
      elements with that same selector to have same
      formatting
    <h1 class=“center”>                <h1 class=“center”>
    <p class=“center”>                 <p class=“center”>

    p.center { text-align: center }    .center { text-align: center }
    h.center { text-align: center }
The ID selector

   ID selector applies to one unique
    element ONLY
       p#para1 {text-align: center; color: green}
   ID selector here is named "para1"
   "para1" is selector for the <p> element
    and defines alignment & color
    properties for anything with this ID
The ID Selector

  p#para1 { text-align: center;
                  color: green }




  <p id=“para1”>
      This text would be centered and green
  </p>
The DIV Selector

<DIV> - can be used with class attributes to create
customized block-level elements
 Create formatted sections

 Acts like a <p> tag

 Declare it in the style rule:
      div.introduction {font-size: 14pt; margin: 24 pt;}

 Apply style rule in the document:
      <div class="introduction">This is the introduction
   to the new document</div>
The SPAN selector

Use <SPAN> with CLASS attribute to create
customized inline elements:
 Declare it in style rule:
    SPAN.logo {color: white; background-color:
    black;}
   Apply the rule in the document
    <p>Welcome to the <span class="logo">Wonder
    Software</span> Website</p>
CSS – What you can change

BACKGROUND:                     FONT
   –    background                 –   font-style
   –    background-color           –   font-variant
   –    background-image           –   font-weight
   –    background-repeat          –   font-size/line-height
   –    background-attachment      –   font-family
   –    background-position
                                PROPERTIES
TEXT:                              –   margin
   –    color                      –   margin-top
   –    direction                  –   margin-left
   –    text-align                 –   margin-right;
   –    text-indent                –   margin-bottom
CSS – Multiple Style Sheets

   Cascading
    – SPECIFICITY
       • Dating: I like flowers unless I tell you I like specific
         flowers
    – ORDER:
       • Relationships: Forget what I said before, it's what I'm
         saying now that matters

   Inheritance
    – HIERARCHY:
       • Children: If you had green eyes and red hair, and your SO
         had green eyes and red hair, your kids SHOULD have
         green eyes/red hair too!
CSS Links and Resources

 Resources
  http://www.w3schools.com/cssref/default.asp
  http://www.css-generator.com/index.php
  http://www.colorschemedesigner.com

 Examples
  http://www.w3schools.com/cssref/tryit.asp?filename=trycs
   s_color
  http://www.csszengarden.com/
  http://css3generator.com/
QUESTIONS?

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Complete Lecture on Css presentation
Complete Lecture on Css presentation Complete Lecture on Css presentation
Complete Lecture on Css presentation
 
Css
CssCss
Css
 
Css presentation introdution with sample basic projects
Css presentation introdution with sample basic projectsCss presentation introdution with sample basic projects
Css presentation introdution with sample basic projects
 
Cascading Style Sheets(CSS)
Cascading Style Sheets(CSS)Cascading Style Sheets(CSS)
Cascading Style Sheets(CSS)
 
TUTORIAL DE CSS 2.0
TUTORIAL DE CSS 2.0TUTORIAL DE CSS 2.0
TUTORIAL DE CSS 2.0
 
1 03 - CSS Introduction
1 03 - CSS Introduction1 03 - CSS Introduction
1 03 - CSS Introduction
 
Basic-CSS-tutorial
Basic-CSS-tutorialBasic-CSS-tutorial
Basic-CSS-tutorial
 
Css
CssCss
Css
 
Css Basics
Css BasicsCss Basics
Css Basics
 
HTML CSS Basics
HTML CSS BasicsHTML CSS Basics
HTML CSS Basics
 
Cascading Style Sheets
Cascading Style SheetsCascading Style Sheets
Cascading Style Sheets
 
How Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) WorksHow Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) Works
 
Css introduction
Css  introductionCss  introduction
Css introduction
 
Css
CssCss
Css
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
 
Introducing Cascading Style Sheets
Introducing Cascading Style SheetsIntroducing Cascading Style Sheets
Introducing Cascading Style Sheets
 
Cascading Style Sheets (CSS)
Cascading Style Sheets (CSS)Cascading Style Sheets (CSS)
Cascading Style Sheets (CSS)
 
Css Complete Notes
Css Complete NotesCss Complete Notes
Css Complete Notes
 
Cascstylesheets
CascstylesheetsCascstylesheets
Cascstylesheets
 
Cascading Style Sheets (CSS) help
Cascading Style Sheets (CSS) helpCascading Style Sheets (CSS) help
Cascading Style Sheets (CSS) help
 

Destaque

LIS3021 Group 7 Fall2012 T@llyCo
LIS3021 Group 7 Fall2012 T@llyCoLIS3021 Group 7 Fall2012 T@llyCo
LIS3021 Group 7 Fall2012 T@llyCoAmanda Case
 
LIS3353 SP12 Week 10
LIS3353 SP12 Week 10LIS3353 SP12 Week 10
LIS3353 SP12 Week 10Amanda Case
 
As media 2u
As media 2uAs media 2u
As media 2u07tjames
 
LIS3353 SP12 Week 11
LIS3353 SP12 Week 11LIS3353 SP12 Week 11
LIS3353 SP12 Week 11Amanda Case
 
LIS3353 SP12 Week 12
LIS3353 SP12 Week 12LIS3353 SP12 Week 12
LIS3353 SP12 Week 12Amanda Case
 

Destaque (7)

LIS3021 Group 7 Fall2012 T@llyCo
LIS3021 Group 7 Fall2012 T@llyCoLIS3021 Group 7 Fall2012 T@llyCo
LIS3021 Group 7 Fall2012 T@llyCo
 
1-22IN BN Newsletter NOV
1-22IN BN Newsletter NOV1-22IN BN Newsletter NOV
1-22IN BN Newsletter NOV
 
LIS3353 SP12 Week 10
LIS3353 SP12 Week 10LIS3353 SP12 Week 10
LIS3353 SP12 Week 10
 
As media 2u
As media 2uAs media 2u
As media 2u
 
LIS3353 SP12 Week 11
LIS3353 SP12 Week 11LIS3353 SP12 Week 11
LIS3353 SP12 Week 11
 
LIS3353 SP12 Week 12
LIS3353 SP12 Week 12LIS3353 SP12 Week 12
LIS3353 SP12 Week 12
 
The three visitors
The three visitorsThe three visitors
The three visitors
 

Semelhante a LIS3353 SP12 Week 13

Semelhante a LIS3353 SP12 Week 13 (20)

Web topic 15 1 basic css layout
Web topic 15 1  basic css layoutWeb topic 15 1  basic css layout
Web topic 15 1 basic css layout
 
Web app development_html_css_03
Web app development_html_css_03Web app development_html_css_03
Web app development_html_css_03
 
html-css
html-csshtml-css
html-css
 
Unit 2-CSS & Bootstrap.ppt
Unit 2-CSS & Bootstrap.pptUnit 2-CSS & Bootstrap.ppt
Unit 2-CSS & Bootstrap.ppt
 
Fwd week2 tw-20120903
Fwd week2 tw-20120903Fwd week2 tw-20120903
Fwd week2 tw-20120903
 
6_CasCadingStylesSheetsCSS.ppt
6_CasCadingStylesSheetsCSS.ppt6_CasCadingStylesSheetsCSS.ppt
6_CasCadingStylesSheetsCSS.ppt
 
Web Design Course: CSS lecture 1
Web Design Course: CSS lecture 1Web Design Course: CSS lecture 1
Web Design Course: CSS lecture 1
 
DW_lesson2.ppt
DW_lesson2.pptDW_lesson2.ppt
DW_lesson2.ppt
 
DW_lesson2.ppt
DW_lesson2.pptDW_lesson2.ppt
DW_lesson2.ppt
 
DW_lesson2.ppt
DW_lesson2.pptDW_lesson2.ppt
DW_lesson2.ppt
 
DW_lesson2.ppt
DW_lesson2.pptDW_lesson2.ppt
DW_lesson2.ppt
 
DW_lesson2.ppt
DW_lesson2.pptDW_lesson2.ppt
DW_lesson2.ppt
 
Cascading Style Sheets By Mukesh
Cascading Style Sheets By MukeshCascading Style Sheets By Mukesh
Cascading Style Sheets By Mukesh
 
Html Styles-CSS
Html Styles-CSSHtml Styles-CSS
Html Styles-CSS
 
Css
CssCss
Css
 
CSS notes
CSS notesCSS notes
CSS notes
 
Css ms megha
Css ms meghaCss ms megha
Css ms megha
 
Lecture-6.pptx
Lecture-6.pptxLecture-6.pptx
Lecture-6.pptx
 
Rational HATS and CSS
Rational HATS and CSSRational HATS and CSS
Rational HATS and CSS
 
Css
CssCss
Css
 

Mais de Amanda Case

LIS3353 SP12 Week 10a
LIS3353 SP12 Week 10aLIS3353 SP12 Week 10a
LIS3353 SP12 Week 10aAmanda Case
 
LIS3353 SP12 Week 10
LIS3353 SP12 Week 10LIS3353 SP12 Week 10
LIS3353 SP12 Week 10Amanda Case
 
LIS3353 SP12 Week 9
LIS3353 SP12 Week 9LIS3353 SP12 Week 9
LIS3353 SP12 Week 9Amanda Case
 
LIS3353 SP12 Week 8
LIS3353 SP12 Week 8LIS3353 SP12 Week 8
LIS3353 SP12 Week 8Amanda Case
 
LIS3353 SP12 Week 7
LIS3353 SP12 Week 7LIS3353 SP12 Week 7
LIS3353 SP12 Week 7Amanda Case
 
LIS3353 SP12 Week 6
LIS3353 SP12 Week 6LIS3353 SP12 Week 6
LIS3353 SP12 Week 6Amanda Case
 
LIS3353 SP12 Week 5a
LIS3353 SP12 Week 5aLIS3353 SP12 Week 5a
LIS3353 SP12 Week 5aAmanda Case
 
LIS3353 SP12 Week 4
LIS3353 SP12 Week 4LIS3353 SP12 Week 4
LIS3353 SP12 Week 4Amanda Case
 
LIS3353 SP12 Week 5
LIS3353 SP12 Week 5LIS3353 SP12 Week 5
LIS3353 SP12 Week 5Amanda Case
 
LIS3353 -SP12 Week 3
LIS3353 -SP12 Week 3LIS3353 -SP12 Week 3
LIS3353 -SP12 Week 3Amanda Case
 
LIS3353 SP 12 Week 2a
LIS3353 SP 12 Week 2aLIS3353 SP 12 Week 2a
LIS3353 SP 12 Week 2aAmanda Case
 
LIS3353 SP12 Week 2
LIS3353 SP12 Week 2LIS3353 SP12 Week 2
LIS3353 SP12 Week 2Amanda Case
 
Lis3353 sp12 week1
Lis3353 sp12 week1Lis3353 sp12 week1
Lis3353 sp12 week1Amanda Case
 
LIS 3353 - Group 1 - GigWalk
LIS 3353 - Group 1 - GigWalkLIS 3353 - Group 1 - GigWalk
LIS 3353 - Group 1 - GigWalkAmanda Case
 

Mais de Amanda Case (14)

LIS3353 SP12 Week 10a
LIS3353 SP12 Week 10aLIS3353 SP12 Week 10a
LIS3353 SP12 Week 10a
 
LIS3353 SP12 Week 10
LIS3353 SP12 Week 10LIS3353 SP12 Week 10
LIS3353 SP12 Week 10
 
LIS3353 SP12 Week 9
LIS3353 SP12 Week 9LIS3353 SP12 Week 9
LIS3353 SP12 Week 9
 
LIS3353 SP12 Week 8
LIS3353 SP12 Week 8LIS3353 SP12 Week 8
LIS3353 SP12 Week 8
 
LIS3353 SP12 Week 7
LIS3353 SP12 Week 7LIS3353 SP12 Week 7
LIS3353 SP12 Week 7
 
LIS3353 SP12 Week 6
LIS3353 SP12 Week 6LIS3353 SP12 Week 6
LIS3353 SP12 Week 6
 
LIS3353 SP12 Week 5a
LIS3353 SP12 Week 5aLIS3353 SP12 Week 5a
LIS3353 SP12 Week 5a
 
LIS3353 SP12 Week 4
LIS3353 SP12 Week 4LIS3353 SP12 Week 4
LIS3353 SP12 Week 4
 
LIS3353 SP12 Week 5
LIS3353 SP12 Week 5LIS3353 SP12 Week 5
LIS3353 SP12 Week 5
 
LIS3353 -SP12 Week 3
LIS3353 -SP12 Week 3LIS3353 -SP12 Week 3
LIS3353 -SP12 Week 3
 
LIS3353 SP 12 Week 2a
LIS3353 SP 12 Week 2aLIS3353 SP 12 Week 2a
LIS3353 SP 12 Week 2a
 
LIS3353 SP12 Week 2
LIS3353 SP12 Week 2LIS3353 SP12 Week 2
LIS3353 SP12 Week 2
 
Lis3353 sp12 week1
Lis3353 sp12 week1Lis3353 sp12 week1
Lis3353 sp12 week1
 
LIS 3353 - Group 1 - GigWalk
LIS 3353 - Group 1 - GigWalkLIS 3353 - Group 1 - GigWalk
LIS 3353 - Group 1 - GigWalk
 

Último

INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxChelloAnnAsuncion2
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxnelietumpap1
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 

Último (20)

TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptx
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 

LIS3353 SP12 Week 13

  • 1. CSS Part II LIS 3353 – Monday 4/2/12
  • 2. Agenda  IT News – E-paper  Grading Updates – All are complete, I just need to upload to Blackboard – I'll post a zip file of a sample spreadsheet and explanations of grading rubrics for the group assignments  Office hours Wednesday – from 2-3 instead of 10-12  CSS – review and continuation
  • 3. CSS - Review  Cascading Style Sheet  Separates CONTENT from DESIGN  More efficient use of time and resources  Selectors (the tag)  Declarations (the design)  4 rules for applying CSS to page
  • 4. CSS – Internal/Embedded  Style information is embedded into the HEAD element of page  All formatting in one location, vs. each individual element/tag on the page needing its own stylistic information attached  Good for small sites/pages <head> <style type="text/css"> hr {color: red;} body {margin-left: 20px;} </style> </head>
  • 5. CSS – External  Style information is external to the webpage  Code shows syntax for linking the webpage to an external CSS  This page below will draw CSS/formatting information frm the yourstyle.css document. <head> <link rel="stylesheet" type="text/css" href="yourstyle.css" /> </head>
  • 6. CSS – Import  This statement may be used in a CSS file or inside the STYLE element.  You can combine importing with other methods  All @import statements must occur at the start of the style sheet  Any rules specified in the style sheets themselves override conflicting rules in the imported style sheets  You can use as many style sheet files as you wish and override them with embedded styles <style type="text/css"> <!— @import url(pagestyle.css); -> </style>
  • 7. CSS – Inline  Least flexible  requires each element to be tagged within the HTML coding of the page. <p style="color:sienna;margin-left:20px">This is a paragraph. </p>
  • 8. CSS Multiple Sheets  Use multiple sheets to dictate formatting of a page  If there are conflicts, the INTERNAL sheet takes precedence  BE CAREFUL! Don't have conflicts!
  • 9. CSS – Multiple Sheets  EXTERNAL CSS (from @import or link href) h3 {color: red; text-align: right; font-size: 8pt}  INTERNAL CSS h3 {text-align: center; font-size: 20pt}  Result?
  • 10. Index card!  Name  FSUID  What is the result of the CSS question?
  • 11. CSS – Multiple Sheets  EXTERNAL CSS (from @import or link href) h3 {color: red; text-align: right; font-size: 8pt}  INTERNAL CSS h3 {text-align: center; font-size: 20pt}  Result? h3 {color: red; text-align: center; font-size: 20pt}
  • 12. CSS – Multiple Sheets Author's User's Browser's style style style sheet sheet sheet Greatest weight Least weight
  • 13. CSS Basics  Three parts – Selector (HTML tag you want to define) – Declaration (the style, consisting of: • Property (attribute of selector) • Value (markup value for that attribute) body {color: black;} p {font-family: "sans serif";} p {text-align: left; color: red;} h1, h2, h3, h4, h5, h6 {color: yellow;}
  • 14. The class selector  In CSS file: – p.right {text-align: right; } – p.left {text-align: left; } – p.center {text-align: center; }  In HTML page: <p class="left"> YOUR TEXT HERE Aligned LEFT</p> <p class="right"> YOUR TEXT HERE Aligned RIGHT</p> <p class="center"> YOUR TEXT HERE ALIGNED CENTER</p> <p class="right" class=“center”> ????</p>
  • 15. The class selector  You can create a class selector free of tag names if you want all tags to be formatted the same .center {text-align: center;}  Any tag with the "center" class will be aligned center  Can omit element name for selector if you wan tall elements with that same selector to have same formatting <h1 class=“center”> <h1 class=“center”> <p class=“center”> <p class=“center”> p.center { text-align: center } .center { text-align: center } h.center { text-align: center }
  • 16. The ID selector  ID selector applies to one unique element ONLY p#para1 {text-align: center; color: green}  ID selector here is named "para1"  "para1" is selector for the <p> element and defines alignment & color properties for anything with this ID
  • 17. The ID Selector p#para1 { text-align: center; color: green } <p id=“para1”> This text would be centered and green </p>
  • 18. The DIV Selector <DIV> - can be used with class attributes to create customized block-level elements  Create formatted sections  Acts like a <p> tag  Declare it in the style rule: div.introduction {font-size: 14pt; margin: 24 pt;} Apply style rule in the document: <div class="introduction">This is the introduction to the new document</div>
  • 19. The SPAN selector Use <SPAN> with CLASS attribute to create customized inline elements:  Declare it in style rule: SPAN.logo {color: white; background-color: black;}  Apply the rule in the document <p>Welcome to the <span class="logo">Wonder Software</span> Website</p>
  • 20. CSS – What you can change BACKGROUND: FONT – background – font-style – background-color – font-variant – background-image – font-weight – background-repeat – font-size/line-height – background-attachment – font-family – background-position PROPERTIES TEXT: – margin – color – margin-top – direction – margin-left – text-align – margin-right; – text-indent – margin-bottom
  • 21. CSS – Multiple Style Sheets  Cascading – SPECIFICITY • Dating: I like flowers unless I tell you I like specific flowers – ORDER: • Relationships: Forget what I said before, it's what I'm saying now that matters  Inheritance – HIERARCHY: • Children: If you had green eyes and red hair, and your SO had green eyes and red hair, your kids SHOULD have green eyes/red hair too!
  • 22. CSS Links and Resources Resources  http://www.w3schools.com/cssref/default.asp  http://www.css-generator.com/index.php  http://www.colorschemedesigner.com Examples  http://www.w3schools.com/cssref/tryit.asp?filename=trycs s_color  http://www.csszengarden.com/  http://css3generator.com/

Notas do Editor

  1. Internal/Embedded Style characteristics are embedded in the HEAD section of the Web page; used when a single page requires a unique style sheetExternal/Linked Connection made via the LINK tag; use the optional TYPE attribute to specify a media type (type/css); most commonImportedAllows for using style sheets from other sources; must be included at the beginning of the style sheet using the @import statementInlineLeast flexible; requires each element to be tagged if you want it to appear differently; loses the advantage of using CSSSimilar to the old HTML style of coding each section
  2. CascadingDetermining rule weight by specificityRules with more specific selectors take precedence over rules with less specific selectorsDetermining rule weight by orderBased on order of rule within style sheetThose listed later take precedence over those listed earlier in the style sheetInheritanceBased on hierarchical structure of documentsCSS rules inherit by child elements from parent elements:Thus &lt;LI&gt; elements will inherit style rules from &lt;UL&gt; elements, unless a style rule is specifically set for the &lt;LI&gt; element