SlideShare a Scribd company logo
More CSS!
       Dave Kanter
Academy of Art University
   Inside Programming
       May 1, 2012
Length Units
Can be absolute or relative.

  Relative:

     em: relative to base font

     ex: relative to the height of “x”

     px: relative to resolution of device
Absolute Units
Absolute Units:

  in: inches

  cm: centimeters

  mm: millimeters

  pt: points

  pc: picas
Absolute Size Keywords
 xx-small

 x-small

 small

 medium

 large

 x-large

 xx-large
Relative Size Keywords
 smaller

 larger
Sizing
  Set the base font:

body { font-size: small;}



  Then scale:

h1 { font-size : 150%; }
Sizing
  For instance:

body { font-size: small; }

h1 { font-size: 150%; }

h2 { font-size: 130%; }

h3 { font-size: 120%; }

ul li { font-size: 90%; }

.note { font-size: 85%; }
Try it!
Create a page using the stylesheet shown on
the last page.

Create each type of text described in the
stylesheet.

Try changing things around and see what
happens!

What happens when you nest percentages?
Float and Clears
You can only float block level elements

  div, ol, ul, p, img, etc...

Inline elements don’t float

  <i>, <strong>, <span>, <br />, etc...

Float determines how item is positioned
relative to container it’s in.

Can float left or right. Other items will
accommodate themselves to the float.
Floats and Clears
Floats

  float: left;

  float: right;

Clears clear floats:

  clear: left;

  clear: right;

  clear: both;
Classes and ID’s
Class:

.myclass { something }



ID:

#myid {something}
Other Effects
 Let’s round some corners!

 .boxbg { background-color:#ccc; }
 .all-round {
   border-radius:1em;
   -moz-border-radius:1em;
   -webkit-border-radius:1em;
 }

<div class=”boxbg all-round”>
Fun With Hover
.block{
  border:5px solid #ccc;
  padding:10px;
  -webkit-border-radius:5px;
}

#fade{
  opacity: 1;
  -webkit-transition: opacity 1s linear;
}

#fade:hover{opacity: 0;}

More Related Content

Similar to card flip

01 Introduction To CSS
01 Introduction To CSS01 Introduction To CSS
01 Introduction To CSS
crgwbr
 
Basics Of Css And Some Common Mistakes
Basics Of Css And Some Common MistakesBasics Of Css And Some Common Mistakes
Basics Of Css And Some Common Mistakes
sanjay2211
 
CSS Foundations, pt 2
CSS Foundations, pt 2CSS Foundations, pt 2
CSS Foundations, pt 2
Shawn Calvert
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
Larry King
 
CSS Basic and Common Errors
CSS Basic and Common ErrorsCSS Basic and Common Errors
CSS Basic and Common Errors
Hock Leng PUAH
 

Similar to card flip (20)

Web Layout
Web LayoutWeb Layout
Web Layout
 
CSS for Beginners
CSS for BeginnersCSS for Beginners
CSS for Beginners
 
01 Introduction To CSS
01 Introduction To CSS01 Introduction To CSS
01 Introduction To CSS
 
Getting to Grips with Firebug - Anthony Hortin - WordCamp Sydney
Getting to Grips with Firebug - Anthony Hortin - WordCamp SydneyGetting to Grips with Firebug - Anthony Hortin - WordCamp Sydney
Getting to Grips with Firebug - Anthony Hortin - WordCamp Sydney
 
Cascading Style Sheets - Part 02
Cascading Style Sheets - Part 02Cascading Style Sheets - Part 02
Cascading Style Sheets - Part 02
 
Intro to CSS
Intro to CSSIntro to CSS
Intro to CSS
 
Basics Of Css And Some Common Mistakes
Basics Of Css And Some Common MistakesBasics Of Css And Some Common Mistakes
Basics Of Css And Some Common Mistakes
 
CSS3 notes
CSS3 notesCSS3 notes
CSS3 notes
 
CSS Foundations, pt 2
CSS Foundations, pt 2CSS Foundations, pt 2
CSS Foundations, pt 2
 
Attsf css kt
Attsf css ktAttsf css kt
Attsf css kt
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
 
Pemrograman Web 2 - CSS
Pemrograman Web 2 - CSSPemrograman Web 2 - CSS
Pemrograman Web 2 - CSS
 
Getting to Grips with Firebug
Getting to Grips with FirebugGetting to Grips with Firebug
Getting to Grips with Firebug
 
Basic css
Basic cssBasic css
Basic css
 
Cascading Style Sheets - Part 01
Cascading Style Sheets - Part 01Cascading Style Sheets - Part 01
Cascading Style Sheets - Part 01
 
CSS For Online Journalism
CSS For Online JournalismCSS For Online Journalism
CSS For Online Journalism
 
CSS Basic and Common Errors
CSS Basic and Common ErrorsCSS Basic and Common Errors
CSS Basic and Common Errors
 
Web Engineering - Introduction to CSS
Web Engineering - Introduction to CSSWeb Engineering - Introduction to CSS
Web Engineering - Introduction to CSS
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
 
Responsive Web Design & Typography
Responsive Web Design & TypographyResponsive Web Design & Typography
Responsive Web Design & Typography
 

Recently uploaded

The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
CarlosHernanMontoyab2
 
Industrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training ReportIndustrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training Report
Avinash Rai
 
Accounting and finance exit exam 2016 E.C.pdf
Accounting and finance exit exam 2016 E.C.pdfAccounting and finance exit exam 2016 E.C.pdf
Accounting and finance exit exam 2016 E.C.pdf
YibeltalNibretu
 

Recently uploaded (20)

The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdfDanh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
 
B.ed spl. HI pdusu exam paper-2023-24.pdf
B.ed spl. HI pdusu exam paper-2023-24.pdfB.ed spl. HI pdusu exam paper-2023-24.pdf
B.ed spl. HI pdusu exam paper-2023-24.pdf
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
Industrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training ReportIndustrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training Report
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Accounting and finance exit exam 2016 E.C.pdf
Accounting and finance exit exam 2016 E.C.pdfAccounting and finance exit exam 2016 E.C.pdf
Accounting and finance exit exam 2016 E.C.pdf
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptxJose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 

card flip

  • 1. More CSS! Dave Kanter Academy of Art University Inside Programming May 1, 2012
  • 2. Length Units Can be absolute or relative. Relative: em: relative to base font ex: relative to the height of “x” px: relative to resolution of device
  • 3. Absolute Units Absolute Units: in: inches cm: centimeters mm: millimeters pt: points pc: picas
  • 4. Absolute Size Keywords xx-small x-small small medium large x-large xx-large
  • 5. Relative Size Keywords smaller larger
  • 6. Sizing Set the base font: body { font-size: small;} Then scale: h1 { font-size : 150%; }
  • 7. Sizing For instance: body { font-size: small; } h1 { font-size: 150%; } h2 { font-size: 130%; } h3 { font-size: 120%; } ul li { font-size: 90%; } .note { font-size: 85%; }
  • 8. Try it! Create a page using the stylesheet shown on the last page. Create each type of text described in the stylesheet. Try changing things around and see what happens! What happens when you nest percentages?
  • 9. Float and Clears You can only float block level elements div, ol, ul, p, img, etc... Inline elements don’t float <i>, <strong>, <span>, <br />, etc... Float determines how item is positioned relative to container it’s in. Can float left or right. Other items will accommodate themselves to the float.
  • 10. Floats and Clears Floats float: left; float: right; Clears clear floats: clear: left; clear: right; clear: both;
  • 11. Classes and ID’s Class: .myclass { something } ID: #myid {something}
  • 12. Other Effects Let’s round some corners! .boxbg { background-color:#ccc; } .all-round { border-radius:1em; -moz-border-radius:1em; -webkit-border-radius:1em; } <div class=”boxbg all-round”>
  • 13. Fun With Hover .block{ border:5px solid #ccc; padding:10px; -webkit-border-radius:5px; } #fade{ opacity: 1; -webkit-transition: opacity 1s linear; } #fade:hover{opacity: 0;}

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