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

Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDhatriParmar
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxkarenfajardo43
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...Nguyen Thanh Tu Collection
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmStan Meyer
 
Narcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfNarcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfPrerana Jadhav
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research DiscourseAnita GoswamiGiri
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptxmary850239
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...DhatriParmar
 
MS4 level being good citizen -imperative- (1) (1).pdf
MS4 level   being good citizen -imperative- (1) (1).pdfMS4 level   being good citizen -imperative- (1) (1).pdf
MS4 level being good citizen -imperative- (1) (1).pdfMr Bounab Samir
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptxmary850239
 
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxBIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxSayali Powar
 
Mental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young mindsMental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young mindsPooky Knightsmith
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 

Último (20)

Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
 
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of EngineeringFaculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and Film
 
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptxINCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
 
Narcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfNarcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdf
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research Discourse
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
 
prashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Professionprashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Profession
 
MS4 level being good citizen -imperative- (1) (1).pdf
MS4 level   being good citizen -imperative- (1) (1).pdfMS4 level   being good citizen -imperative- (1) (1).pdf
MS4 level being good citizen -imperative- (1) (1).pdf
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx
 
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxBIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
 
Mental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young mindsMental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young minds
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 

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