SlideShare a Scribd company logo
1 of 32
Download to read offline
EASING
INTO WEB
DEVELOPMENT
7.
7 CSS FRAMEWORKS
1   INTRODUCTION
    2   HTML
    3   TABLES
    4   FORMS
    5   HTTP
    6   CSS
    7   CSS FRAMEWORKS
    8   DIGITAL MEDIA
2   9   USABILITY
The Problem with CSS
    Most web design is based around two-dimensional
     (2D) grids.
       Unfortunately,                  CSS was not designed to describe 2D
        grids.
       Rather, CSS assumes that every page will be made up
        of a vertical stack of blocks, piled one on top of
        another.




    Rachek Andrew & Kevin Yank, Everything you know about CSS is wrong   (Sitepoint, 2008).
1D 2D
1-D vs 2-D Layouts




Rachek Andrew & Kevin Yank, Everything you know about CSS is wrong   (Sitepoint, 2008).
CSS Layout Techniques
   In d t
    I order to coerce a vertical stack of block elements into a
                             ti l t k f bl k l           t i t
    grid-like layout, designers have used absolute positioning or
    floating to force blocks to sit alongside each other.
   Problems
       Complex!!
       Browser compatibility
        B               ibili
       Clearing floats
       Footers
       Faux columns required
       Nesting columns is very tricky
       Source order
        S        d
       In other words, CSS layouts are a total hack!
Layout Using Tables
   That is why HTML tables seem to be such a
    “natural” way of doing layout.
     It is similar to the way traditional print design works
      (i.e., using grids)




                                                http://www.savorthesuccess.com
       http://www.ideabook.com/tutorials/
CSS Table Layout Mode
   We can achieve 2D layouts without the complexity
    of positioning and floats using CSS Table Layout
    Mode.
     Only   works in modern browsers that support CSS 2.1
      (IE8, FF 3, Safari 4, Chrome).
CSS Table Layout Mode
<div id= wrapper > 
<div id="wrapper">
  <div id="header">
       ⋮ header content…
  </div> 
  <div id="main"> 
     <div id="nav"> 
        ⋮ navigation column content…
          navigation column content… 
     </div> 
     <div id="extras">
        ⋮ news headlines column content… 
     </div> 
     <div id="content"> 
        ⋮ main article content… 
     </div> 
  </div> 
</div>

 #main { display: table; 
                     p         p ; }
         border‐collapse: collapse; } 
 #nav { display: table‐cell; 
        width: 180px; 
        background‐color: #e7dbcd; } 
 #extras { display: table‐cell; 
           width: 180px; 
           padding‐left: 10px; 
           padding left: 10px;
           border‐right: 1px dotted #d7ad7b; } 
 #content { display: table‐cell; 
            width: 380px; 
            padding‐left: 10px; } 




        Rachek Andrew & Kevin Yank, Everything you know about CSS is wrong   (Sitepoint, 2008).
Aren t
Aren’t Tables for Layout Pure Evil?
   Using HTML tables for layout is wrong
   Here we are using CSS table display mode to
                    g                p y
    describe how to display/present content.
     Using   CSS to describe presentation is pure goodness!
Why aren’t we using this?
    aren t
    Still too many people using IE7 and below.
      Perhaps        by 2013 we will all be able to use CSS table
        layout.




    http://stats.wikimedia.org/wikimedia/squids/SquidReportClients.htm
CSS 3 Grids
    CSS 3 h another table-less solution to grid layout
            has     h      bl l       l i       id l
     called grid positioning that will be even more
     p
     powerful.
         Currently only support in FF 3.5, Safari 4, Chrome

    body { 
      grid‐columns: 10em,1em,10em,1em,10em,1em,10em,1em,10em,1em,10em, 1em,10em;
    }




                                                           #promo { 
                                                             position: absolute; 
                                                             left: 1gr; 
                                                             width: 4gr;
                                                             width: 4gr;
                                                           }


    Rachek Andrew & Kevin Yank, Everything you know about CSS is wrong   (Sitepoint, 2008).
Why Grids?
   Closer in approach to print-design.
   Grids are an easy way of achieving design
                    y y                 g  g
    consistency.
http://www.w3.org/TR/css3‐grid
CSS Frameworks to the Rescue
   While IE 6+7 still has a non-trivial marketshare, we
    can use CSS Frameworks as a way to more easily
    create complex CSS-based layouts.
     Still
         use the hacks of floats and positioning, but
     someone else has done all the hard work for you.
Common CSS Frameworks
   960 G id System
        Grid S t
       Developers construct layouts using a grid system based on a fixed width
        of 960 pixels.
       There are two variants: 12 and 16 columns.
                                          6
   Blueprint
       Originally a Google project.
           g     y       g p j
       Uses a grid of 24 columns, 950px fixed width.
   YUI Grids
       A Y h project. D
          Yahoo      j t Doesn’t use grid metaphor.
                                ’t       id t h
       Supports fluid-width (100%) layouts as well as preset fixed-width
        layouts at 750px, 950px, and 974px.
       Six
        S preset templates, and the ability to stack and nest subdivided
                        l         d h bl           k d           bd d d
        regions of two, three, or four columns.
   There are dozens of others.
Drawbacks to CSS Frameworks

   Typically limited to fixed sizes provided by
    framework.
   Ultimately, you are adding presentation back into
    y
    your markup.p
     E.g.,if fixed width of 960 pixels and you have the
      following markup: <div class span 4 then really
                           div class=“span-4”>
      not much difference from the old table layout (except
                  p)
      less markup).
Why 950px, 960px, or 974px?




960 is evenly divisible by 2, 3, 4, 5, 6, 8, 10, 12, 15, 16, 20, 24, 30,
32, 40, 48, 60, 64, 80, 96, 120, 160, 192, 240, 320 and 480.
(i.e.,
(i e many grid possibilities)
               possibilities).


http://www.subtraction.com/pics/0703/grids_are_good.pdf
Grid Examples




http://www.subtraction.com/pics/0703/grids_are_good.pdf
Grid Examples




http://www.subtraction.com/pics/0703/grids_are_good.pdf
960 Grids – 12 Columns
960 Grids – 12 Columns
960 Grids – 16 Columns
960 Grids – 16 Columns
Examples
<link rel="stylesheet" href="css/reset.css" />
<link rel="stylesheet" href="css/text.css" />    960 Grid CSS files      http://960.gs/
<link rel="stylesheet" href="css/960.css" />

<div class="container_12">                                   Indicates 12 column grid

    <div class="grid_12"><p>940px</p></div>                  First row will span 12 grids
    <div class="clear"></div>                                Each row must be terminated with this clear !!

    <div class="grid_6"><p>460px</p></div>                   Second row contains 2 divs that each span 6 grids
    <div class="grid_6"><p>460px</p></div>
    <div class="clear"></div>                                Each row must be terminated with this clear !!
</div>
How many grid columns?
How many rows?
<div class="container_12">

    <div class="grid_12"><p>grid_12</p></div>
    <div class="clear"></div>
     di   l    " id 12"       id 12 /   /di
    <div class="grid_12"><p>grid_12</p></div>
    <div class="clear"></div>




    <div class="grid_7"><p>grid_7</p></div>
    <div class="grid_5"><p>grid_5</p></div>
    <div class="clear"></div>




    <div class="grid_12"><p>grid_12</p></div>
    <div class="clear"></div>




    <div class="grid_3"><p>grid_3</p></div>
    <div class="grid_3"><p>grid_3</p></div>
    <div class="grid_3"><p>grid_3</p></div>
    <div class="grid_3"><p>grid_3</p></div>
    <div class="clear"></div>




    <div class="grid_12"><p>grid_12</p></div>
                g         p g       /p /
    <div class="clear"></div>

    <div class="grid_4"><p>grid_4</p></div>
    <div class="grid_4"><p>grid_4</p></div>
    <div class="grid_4"><p>grid_4</p></div>
    <div class="clear"></div>
</div>
How many grid columns?




Notice that content can “spill” into gutters
grid_12                         How many rows?


grid_4        grid_5            grid_3




grid_4                 grid_8




                                         What about this?




         grid_12
Nested Rows
                                                                                        <div class="container_12">
                                                                                           …

                                                                                           <div class="grid_4">
                                                                                               <h3>More Information</h3>
                                                                                               …



                                                                                           </div>



                                                                                           <div class="grid_8">
    grid_4                                grid_8                                               <h2>Welcome to Airfeed</h2>
                                                                                               …
                                                                                                 First grid in nested row marked with alpha
                                                                                                 Last grid in nested row marked with omega
                                                                                             <div class="grid_2 alpha">
                                                                                                …
                                                                                             </div>
                                         # of grids in nested row = # grids in parent        <div class="grid_2">
                                                       2+2+2+2 = 8                              …
                                                                                             </div>
                                                                                             <div class="grid_2">
             grid_2             grid_2              grid_2               grid_2
                                                                                                …
                                                                                             </div>
                                                                                             <div class="grid_2 omega">
                                                                                                …
                                                                                             </div>

                      grid_4                                   grid_4                        <div class="grid_4 alpha">
                                                                                                …
                                                                                             </div>

                                                                                             <div class="grid_4 omega">
                                                                                                …
                                                                                             </div>

                                                                                           </div>
                                                                                           <div class="grid_12">
                                                                                              <div class="grid_3 alpha">
                                                                                                 …
                                                                                               /di
                                                                                              </div>
                                                                                              <div class="grid_9 omega">
                      grid_12
grid_3                              grid_9                                                       …
                                                                                              </div>
                                                                                          </div>
                                                                                        </div>
grid_4                 grid_5                              grid_3




    grid_4                               grid_8




             grid_2             grid_2            grid_2            grid_2




                      grid_4                               grid_4




                      grid_12
grid_3                              grid_9

More Related Content

Similar to Web I - 07 - CSS Frameworks

Drupal 960 grid system based theming
Drupal 960 grid system based theming Drupal 960 grid system based theming
Drupal 960 grid system based theming Gaurav Mishra
 
New layout models on the Web (Mobile World Congress 2014)
New layout models on the Web (Mobile World Congress 2014)New layout models on the Web (Mobile World Congress 2014)
New layout models on the Web (Mobile World Congress 2014)Igalia
 
Would you like some Grids with that?
Would you like some Grids with that?Would you like some Grids with that?
Would you like some Grids with that?Kianosh Pourian
 
Google Developers Experts Summit 2017 - CSS Layout
Google Developers Experts Summit 2017 - CSS Layout Google Developers Experts Summit 2017 - CSS Layout
Google Developers Experts Summit 2017 - CSS Layout Rachel Andrew
 
DUG: Grids & Panels
DUG: Grids & PanelsDUG: Grids & Panels
DUG: Grids & PanelsPure Sign
 
What I discovered about layout vis CSS Grid
What I discovered about layout vis CSS GridWhat I discovered about layout vis CSS Grid
What I discovered about layout vis CSS GridRachel Andrew
 
Accelerated grid theming using NineSixty (Dallas Drupal Days 2011)
Accelerated grid theming using NineSixty (Dallas Drupal Days 2011)Accelerated grid theming using NineSixty (Dallas Drupal Days 2011)
Accelerated grid theming using NineSixty (Dallas Drupal Days 2011)Four Kitchens
 
Advance Css
Advance CssAdvance Css
Advance Cssvijayta
 
Advance Css 1194323118268797 5
Advance Css 1194323118268797 5Advance Css 1194323118268797 5
Advance Css 1194323118268797 5dharshyamal
 
Object-Oriented CSS 從 OOCSS, SMACSS, BEM 到 AMCSS
Object-Oriented CSS 從 OOCSS, SMACSS, BEM 到 AMCSSObject-Oriented CSS 從 OOCSS, SMACSS, BEM 到 AMCSS
Object-Oriented CSS 從 OOCSS, SMACSS, BEM 到 AMCSSLi-Wei Lu
 
Start Using CSS Grid Layout Today - RuhrJS
Start Using CSS Grid Layout Today - RuhrJSStart Using CSS Grid Layout Today - RuhrJS
Start Using CSS Grid Layout Today - RuhrJSRachel Andrew
 
WEB DESIGNING AND DEVELOPMEENT.pptx
WEB DESIGNING AND DEVELOPMEENT.pptxWEB DESIGNING AND DEVELOPMEENT.pptx
WEB DESIGNING AND DEVELOPMEENT.pptxNamanGupta785817
 
960 grid psd
960 grid psd960 grid psd
960 grid psdRaju Nag
 
MW2011 Grid-based Web Design presentation
MW2011 Grid-based Web Design presentationMW2011 Grid-based Web Design presentation
MW2011 Grid-based Web Design presentationCharlie Moad
 
CSS3 for web designer - How to design a visually appealing website
CSS3 for web designer - How to design a visually appealing websiteCSS3 for web designer - How to design a visually appealing website
CSS3 for web designer - How to design a visually appealing websiteMario Hernandez
 
CSS Day: CSS Grid Layout
CSS Day: CSS Grid Layout CSS Day: CSS Grid Layout
CSS Day: CSS Grid Layout Rachel Andrew
 
Css for Development
Css for DevelopmentCss for Development
Css for Developmenttsengsite
 

Similar to Web I - 07 - CSS Frameworks (20)

Class15
Class15Class15
Class15
 
Drupal 960 grid system based theming
Drupal 960 grid system based theming Drupal 960 grid system based theming
Drupal 960 grid system based theming
 
New layout models on the Web (Mobile World Congress 2014)
New layout models on the Web (Mobile World Congress 2014)New layout models on the Web (Mobile World Congress 2014)
New layout models on the Web (Mobile World Congress 2014)
 
Would you like some Grids with that?
Would you like some Grids with that?Would you like some Grids with that?
Would you like some Grids with that?
 
Google Developers Experts Summit 2017 - CSS Layout
Google Developers Experts Summit 2017 - CSS Layout Google Developers Experts Summit 2017 - CSS Layout
Google Developers Experts Summit 2017 - CSS Layout
 
DUG: Grids & Panels
DUG: Grids & PanelsDUG: Grids & Panels
DUG: Grids & Panels
 
What I discovered about layout vis CSS Grid
What I discovered about layout vis CSS GridWhat I discovered about layout vis CSS Grid
What I discovered about layout vis CSS Grid
 
Accelerated grid theming using NineSixty (Dallas Drupal Days 2011)
Accelerated grid theming using NineSixty (Dallas Drupal Days 2011)Accelerated grid theming using NineSixty (Dallas Drupal Days 2011)
Accelerated grid theming using NineSixty (Dallas Drupal Days 2011)
 
Advance Css
Advance CssAdvance Css
Advance Css
 
Advance Css 1194323118268797 5
Advance Css 1194323118268797 5Advance Css 1194323118268797 5
Advance Css 1194323118268797 5
 
Object-Oriented CSS 從 OOCSS, SMACSS, BEM 到 AMCSS
Object-Oriented CSS 從 OOCSS, SMACSS, BEM 到 AMCSSObject-Oriented CSS 從 OOCSS, SMACSS, BEM 到 AMCSS
Object-Oriented CSS 從 OOCSS, SMACSS, BEM 到 AMCSS
 
Start Using CSS Grid Layout Today - RuhrJS
Start Using CSS Grid Layout Today - RuhrJSStart Using CSS Grid Layout Today - RuhrJS
Start Using CSS Grid Layout Today - RuhrJS
 
WEB DESIGNING AND DEVELOPMEENT.pptx
WEB DESIGNING AND DEVELOPMEENT.pptxWEB DESIGNING AND DEVELOPMEENT.pptx
WEB DESIGNING AND DEVELOPMEENT.pptx
 
960 grid psd
960 grid psd960 grid psd
960 grid psd
 
MW2011 Grid-based Web Design presentation
MW2011 Grid-based Web Design presentationMW2011 Grid-based Web Design presentation
MW2011 Grid-based Web Design presentation
 
CSS3 for web designer - How to design a visually appealing website
CSS3 for web designer - How to design a visually appealing websiteCSS3 for web designer - How to design a visually appealing website
CSS3 for web designer - How to design a visually appealing website
 
CSS Day: CSS Grid Layout
CSS Day: CSS Grid Layout CSS Day: CSS Grid Layout
CSS Day: CSS Grid Layout
 
World of CSS Grid
World of CSS GridWorld of CSS Grid
World of CSS Grid
 
CSS Grid Layout
CSS Grid LayoutCSS Grid Layout
CSS Grid Layout
 
Css for Development
Css for DevelopmentCss for Development
Css for Development
 

More from Randy Connolly

Ten-Year Anniversary of our CIS Degree
Ten-Year Anniversary of our CIS DegreeTen-Year Anniversary of our CIS Degree
Ten-Year Anniversary of our CIS DegreeRandy Connolly
 
Careers in Computing (2019 Edition)
Careers in Computing (2019 Edition)Careers in Computing (2019 Edition)
Careers in Computing (2019 Edition)Randy Connolly
 
Facing Backwards While Stumbling Forwards: The Future of Teaching Web Develop...
Facing Backwards While Stumbling Forwards: The Future of Teaching Web Develop...Facing Backwards While Stumbling Forwards: The Future of Teaching Web Develop...
Facing Backwards While Stumbling Forwards: The Future of Teaching Web Develop...Randy Connolly
 
Where is the Internet? (2019 Edition)
Where is the Internet? (2019 Edition)Where is the Internet? (2019 Edition)
Where is the Internet? (2019 Edition)Randy Connolly
 
Modern Web Development (2018)
Modern Web Development (2018)Modern Web Development (2018)
Modern Web Development (2018)Randy Connolly
 
Helping Prospective Students Understand the Computing Disciplines
Helping Prospective Students Understand the Computing DisciplinesHelping Prospective Students Understand the Computing Disciplines
Helping Prospective Students Understand the Computing DisciplinesRandy Connolly
 
Constructing a Web Development Textbook
Constructing a Web Development TextbookConstructing a Web Development Textbook
Constructing a Web Development TextbookRandy Connolly
 
Web Development for Managers
Web Development for ManagersWeb Development for Managers
Web Development for ManagersRandy Connolly
 
Disrupting the Discourse of the "Digital Disruption of _____"
Disrupting the Discourse of the "Digital Disruption of _____"Disrupting the Discourse of the "Digital Disruption of _____"
Disrupting the Discourse of the "Digital Disruption of _____"Randy Connolly
 
17 Ways to Fail Your Courses
17 Ways to Fail Your Courses17 Ways to Fail Your Courses
17 Ways to Fail Your CoursesRandy Connolly
 
Red Fish Blue Fish: Reexamining Student Understanding of the Computing Discip...
Red Fish Blue Fish: Reexamining Student Understanding of the Computing Discip...Red Fish Blue Fish: Reexamining Student Understanding of the Computing Discip...
Red Fish Blue Fish: Reexamining Student Understanding of the Computing Discip...Randy Connolly
 
Constructing and revising a web development textbook
Constructing and revising a web development textbookConstructing and revising a web development textbook
Constructing and revising a web development textbookRandy Connolly
 
Computing is Not a Rock Band: Student Understanding of the Computing Disciplines
Computing is Not a Rock Band: Student Understanding of the Computing DisciplinesComputing is Not a Rock Band: Student Understanding of the Computing Disciplines
Computing is Not a Rock Band: Student Understanding of the Computing DisciplinesRandy Connolly
 
Citizenship: How do leaders in universities think about and experience citize...
Citizenship: How do leaders in universities think about and experience citize...Citizenship: How do leaders in universities think about and experience citize...
Citizenship: How do leaders in universities think about and experience citize...Randy Connolly
 
Thinking About Technology
Thinking About TechnologyThinking About Technology
Thinking About TechnologyRandy Connolly
 
A longitudinal examination of SIGITE conference submission data
A longitudinal examination of SIGITE conference submission dataA longitudinal examination of SIGITE conference submission data
A longitudinal examination of SIGITE conference submission dataRandy Connolly
 
Is Human Flourishing in the ICT World of the Future Likely?
Is Human Flourishing in the ICT World of the Future Likely?Is Human Flourishing in the ICT World of the Future Likely?
Is Human Flourishing in the ICT World of the Future Likely?Randy Connolly
 
Constructing a Contemporary Textbook
Constructing a Contemporary TextbookConstructing a Contemporary Textbook
Constructing a Contemporary TextbookRandy Connolly
 

More from Randy Connolly (20)

Ten-Year Anniversary of our CIS Degree
Ten-Year Anniversary of our CIS DegreeTen-Year Anniversary of our CIS Degree
Ten-Year Anniversary of our CIS Degree
 
Careers in Computing (2019 Edition)
Careers in Computing (2019 Edition)Careers in Computing (2019 Edition)
Careers in Computing (2019 Edition)
 
Facing Backwards While Stumbling Forwards: The Future of Teaching Web Develop...
Facing Backwards While Stumbling Forwards: The Future of Teaching Web Develop...Facing Backwards While Stumbling Forwards: The Future of Teaching Web Develop...
Facing Backwards While Stumbling Forwards: The Future of Teaching Web Develop...
 
Where is the Internet? (2019 Edition)
Where is the Internet? (2019 Edition)Where is the Internet? (2019 Edition)
Where is the Internet? (2019 Edition)
 
Modern Web Development (2018)
Modern Web Development (2018)Modern Web Development (2018)
Modern Web Development (2018)
 
Helping Prospective Students Understand the Computing Disciplines
Helping Prospective Students Understand the Computing DisciplinesHelping Prospective Students Understand the Computing Disciplines
Helping Prospective Students Understand the Computing Disciplines
 
Constructing a Web Development Textbook
Constructing a Web Development TextbookConstructing a Web Development Textbook
Constructing a Web Development Textbook
 
Web Development for Managers
Web Development for ManagersWeb Development for Managers
Web Development for Managers
 
Disrupting the Discourse of the "Digital Disruption of _____"
Disrupting the Discourse of the "Digital Disruption of _____"Disrupting the Discourse of the "Digital Disruption of _____"
Disrupting the Discourse of the "Digital Disruption of _____"
 
17 Ways to Fail Your Courses
17 Ways to Fail Your Courses17 Ways to Fail Your Courses
17 Ways to Fail Your Courses
 
Red Fish Blue Fish: Reexamining Student Understanding of the Computing Discip...
Red Fish Blue Fish: Reexamining Student Understanding of the Computing Discip...Red Fish Blue Fish: Reexamining Student Understanding of the Computing Discip...
Red Fish Blue Fish: Reexamining Student Understanding of the Computing Discip...
 
Constructing and revising a web development textbook
Constructing and revising a web development textbookConstructing and revising a web development textbook
Constructing and revising a web development textbook
 
Computing is Not a Rock Band: Student Understanding of the Computing Disciplines
Computing is Not a Rock Band: Student Understanding of the Computing DisciplinesComputing is Not a Rock Band: Student Understanding of the Computing Disciplines
Computing is Not a Rock Band: Student Understanding of the Computing Disciplines
 
Citizenship: How do leaders in universities think about and experience citize...
Citizenship: How do leaders in universities think about and experience citize...Citizenship: How do leaders in universities think about and experience citize...
Citizenship: How do leaders in universities think about and experience citize...
 
Thinking About Technology
Thinking About TechnologyThinking About Technology
Thinking About Technology
 
A longitudinal examination of SIGITE conference submission data
A longitudinal examination of SIGITE conference submission dataA longitudinal examination of SIGITE conference submission data
A longitudinal examination of SIGITE conference submission data
 
Web Security
Web SecurityWeb Security
Web Security
 
Is Human Flourishing in the ICT World of the Future Likely?
Is Human Flourishing in the ICT World of the Future Likely?Is Human Flourishing in the ICT World of the Future Likely?
Is Human Flourishing in the ICT World of the Future Likely?
 
Constructing a Contemporary Textbook
Constructing a Contemporary TextbookConstructing a Contemporary Textbook
Constructing a Contemporary Textbook
 
CSS: Introduction
CSS: IntroductionCSS: Introduction
CSS: Introduction
 

Recently uploaded

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 

Recently uploaded (20)

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 

Web I - 07 - CSS Frameworks

  • 2. 1 INTRODUCTION 2 HTML 3 TABLES 4 FORMS 5 HTTP 6 CSS 7 CSS FRAMEWORKS 8 DIGITAL MEDIA 2 9 USABILITY
  • 3. The Problem with CSS  Most web design is based around two-dimensional (2D) grids.  Unfortunately, CSS was not designed to describe 2D grids.  Rather, CSS assumes that every page will be made up of a vertical stack of blocks, piled one on top of another. Rachek Andrew & Kevin Yank, Everything you know about CSS is wrong (Sitepoint, 2008).
  • 4. 1D 2D 1-D vs 2-D Layouts Rachek Andrew & Kevin Yank, Everything you know about CSS is wrong (Sitepoint, 2008).
  • 5. CSS Layout Techniques  In d t I order to coerce a vertical stack of block elements into a ti l t k f bl k l t i t grid-like layout, designers have used absolute positioning or floating to force blocks to sit alongside each other.  Problems  Complex!!  Browser compatibility B ibili  Clearing floats  Footers  Faux columns required  Nesting columns is very tricky  Source order S d  In other words, CSS layouts are a total hack!
  • 6. Layout Using Tables  That is why HTML tables seem to be such a “natural” way of doing layout.  It is similar to the way traditional print design works (i.e., using grids) http://www.savorthesuccess.com http://www.ideabook.com/tutorials/
  • 7. CSS Table Layout Mode  We can achieve 2D layouts without the complexity of positioning and floats using CSS Table Layout Mode.  Only works in modern browsers that support CSS 2.1 (IE8, FF 3, Safari 4, Chrome).
  • 8. CSS Table Layout Mode <div id= wrapper >  <div id="wrapper"> <div id="header"> ⋮ header content… </div>  <div id="main">  <div id="nav">  ⋮ navigation column content… navigation column content…  </div>  <div id="extras"> ⋮ news headlines column content…  </div>  <div id="content">  ⋮ main article content…  </div>  </div>  </div> #main { display: table;  p p ; } border‐collapse: collapse; }  #nav { display: table‐cell;  width: 180px;  background‐color: #e7dbcd; }  #extras { display: table‐cell;  width: 180px;  padding‐left: 10px;  padding left: 10px; border‐right: 1px dotted #d7ad7b; }  #content { display: table‐cell;  width: 380px;  padding‐left: 10px; }  Rachek Andrew & Kevin Yank, Everything you know about CSS is wrong (Sitepoint, 2008).
  • 9. Aren t Aren’t Tables for Layout Pure Evil?  Using HTML tables for layout is wrong  Here we are using CSS table display mode to g p y describe how to display/present content.  Using CSS to describe presentation is pure goodness!
  • 10. Why aren’t we using this? aren t  Still too many people using IE7 and below.  Perhaps by 2013 we will all be able to use CSS table layout. http://stats.wikimedia.org/wikimedia/squids/SquidReportClients.htm
  • 11. CSS 3 Grids  CSS 3 h another table-less solution to grid layout has h bl l l i id l called grid positioning that will be even more p powerful.  Currently only support in FF 3.5, Safari 4, Chrome body {  grid‐columns: 10em,1em,10em,1em,10em,1em,10em,1em,10em,1em,10em, 1em,10em; } #promo {  position: absolute;  left: 1gr;  width: 4gr; width: 4gr; } Rachek Andrew & Kevin Yank, Everything you know about CSS is wrong (Sitepoint, 2008).
  • 12. Why Grids?  Closer in approach to print-design.  Grids are an easy way of achieving design y y g g consistency.
  • 13.
  • 15. CSS Frameworks to the Rescue  While IE 6+7 still has a non-trivial marketshare, we can use CSS Frameworks as a way to more easily create complex CSS-based layouts.  Still use the hacks of floats and positioning, but  someone else has done all the hard work for you.
  • 16. Common CSS Frameworks  960 G id System Grid S t  Developers construct layouts using a grid system based on a fixed width of 960 pixels.  There are two variants: 12 and 16 columns. 6  Blueprint  Originally a Google project. g y g p j  Uses a grid of 24 columns, 950px fixed width.  YUI Grids  A Y h project. D Yahoo j t Doesn’t use grid metaphor. ’t id t h  Supports fluid-width (100%) layouts as well as preset fixed-width layouts at 750px, 950px, and 974px.  Six S preset templates, and the ability to stack and nest subdivided l d h bl k d bd d d regions of two, three, or four columns.  There are dozens of others.
  • 17. Drawbacks to CSS Frameworks  Typically limited to fixed sizes provided by framework.  Ultimately, you are adding presentation back into y your markup.p  E.g.,if fixed width of 960 pixels and you have the following markup: <div class span 4 then really div class=“span-4”> not much difference from the old table layout (except p) less markup).
  • 18. Why 950px, 960px, or 974px? 960 is evenly divisible by 2, 3, 4, 5, 6, 8, 10, 12, 15, 16, 20, 24, 30, 32, 40, 48, 60, 64, 80, 96, 120, 160, 192, 240, 320 and 480. (i.e., (i e many grid possibilities) possibilities). http://www.subtraction.com/pics/0703/grids_are_good.pdf
  • 21. 960 Grids – 12 Columns
  • 22. 960 Grids – 12 Columns
  • 23. 960 Grids – 16 Columns
  • 24. 960 Grids – 16 Columns
  • 25. Examples <link rel="stylesheet" href="css/reset.css" /> <link rel="stylesheet" href="css/text.css" /> 960 Grid CSS files http://960.gs/ <link rel="stylesheet" href="css/960.css" /> <div class="container_12"> Indicates 12 column grid <div class="grid_12"><p>940px</p></div> First row will span 12 grids <div class="clear"></div> Each row must be terminated with this clear !! <div class="grid_6"><p>460px</p></div>   Second row contains 2 divs that each span 6 grids <div class="grid_6"><p>460px</p></div> <div class="clear"></div> Each row must be terminated with this clear !! </div>
  • 26. How many grid columns?
  • 28. <div class="container_12"> <div class="grid_12"><p>grid_12</p></div> <div class="clear"></div> di l " id 12" id 12 / /di <div class="grid_12"><p>grid_12</p></div> <div class="clear"></div> <div class="grid_7"><p>grid_7</p></div> <div class="grid_5"><p>grid_5</p></div> <div class="clear"></div> <div class="grid_12"><p>grid_12</p></div> <div class="clear"></div> <div class="grid_3"><p>grid_3</p></div> <div class="grid_3"><p>grid_3</p></div> <div class="grid_3"><p>grid_3</p></div> <div class="grid_3"><p>grid_3</p></div> <div class="clear"></div> <div class="grid_12"><p>grid_12</p></div> g p g /p / <div class="clear"></div> <div class="grid_4"><p>grid_4</p></div> <div class="grid_4"><p>grid_4</p></div> <div class="grid_4"><p>grid_4</p></div> <div class="clear"></div> </div>
  • 29. How many grid columns? Notice that content can “spill” into gutters
  • 30. grid_12 How many rows? grid_4 grid_5 grid_3 grid_4 grid_8 What about this? grid_12
  • 31. Nested Rows <div class="container_12"> … <div class="grid_4"> <h3>More Information</h3> … </div> <div class="grid_8"> grid_4 grid_8 <h2>Welcome to Airfeed</h2> … First grid in nested row marked with alpha Last grid in nested row marked with omega <div class="grid_2 alpha"> … </div> # of grids in nested row = # grids in parent <div class="grid_2"> 2+2+2+2 = 8 … </div> <div class="grid_2"> grid_2 grid_2 grid_2 grid_2 … </div> <div class="grid_2 omega"> … </div> grid_4 grid_4 <div class="grid_4 alpha"> … </div> <div class="grid_4 omega"> … </div> </div> <div class="grid_12"> <div class="grid_3 alpha"> … /di </div> <div class="grid_9 omega"> grid_12 grid_3 grid_9 … </div> </div> </div>
  • 32. grid_4 grid_5 grid_3 grid_4 grid_8 grid_2 grid_2 grid_2 grid_2 grid_4 grid_4 grid_12 grid_3 grid_9