SlideShare une entreprise Scribd logo
1  sur  30
Télécharger pour lire hors ligne
Style Your Site
A Comprehensive
CSS Design Tutorial




Ben MacNeill
User Interface Designer,
eXtension at NCSU




http://commons.wikimedia.org/wiki/File:SkeletonsNumbers.png
What is CSS?
What is CSS?
Why Use CSS?



document        document
 content       presentation
Some real reasons

•   Accessibility (Section 508 anyone?)

•   Reduce complexity/repetition in the markup

•   The Cosmetic stuff is all in one place. Global
    design changes are easy.

•   Your content is more portable for mobile
    devices, feed readers, printing

•   It's not 1999
Simple, semantic
         html markup
    creates good structure




Laying the Ground Work
TABLES

ARE    FOR      DATA



NOT    FOR     LAYOUT
CSS Syntax

     h1 {font-size: 1.5em}


selectors                  values


              properties
CSS Selectors
       type selector
div
                   ID selector
div#feature
                   Class selector
div.comment
                       ID + Class
div#feature.audio
First Session
•   Fixed-width layout

•   Flexible, bulletproof text-based navigation

•   Light design styling

•   Print stylesheet (if time)
Second Session
       The Enhancing

•   CSS-based image sprites & background images

•   Fluid layout

•   Font control

•   CSS reset stylesheet

•   Convert form to semantic markup and style it

•   Mobile stylesheet for the iPhone
Let’s Go to
the Browser
Important Concepts
 (Visual formatting model)
The Display Property
Every html element has a
default display: property

Block-level elements:
<p>, <ul>, <div>

Inline-level elements:
<em>, <span>
The Display Property
Block-level elements are formatted visually
as blocks.


Inline-level elements are formatted visually
as lines.
The Cascade
         div {color: red;}
         div div {color: blue;}
         div div div {color: green;}


•   Each style rule (the selector) is assigned a
    weight
•   Most specific selector (greatest weight) wins
Winning the Cascade


•   Most specific selector wins

•   If two selectors are equal, last one wins

•   inline styles beat style sheets

•   !important beats everything
All Elements Are Not
            Equal
          div p
          div.feature p
          div#article p
          div#article.feature p

•   Classes and IDs carry more weight or
    specificity
The
Box
Model


        http://www.flickr.com/photos/31288116@N02/3065654591/
Width != Width
Shorthand
margin: 10px 20px 30px 10px;
         top    right bottom left

margin: 10px 20px 20px;
         top    sides bottom

margin: 10px 20px;
      top/bottom sides

margin: 10px;
         all
Floating

•   Floated elements are taken out of the normal
    document flow and shifted to the left or right
    as far as it can go

•   elements following floated elements shift up
    and wrap unless cleared with the clear:
    property
Tools & Testing

•   Firebug
    http://getfirebug.com/

•   Web Developer Toolbar
    by Chris Pederick (Firefox)
    http://chrispederick.com/work/web-developer/

•   Target: Firefox > Safari > IE8 > IE7
Tip: Firebug can help
 with the Box Model
•   CSS Selectors Cheat Sheet:
    www.cameronmoll.com/articles/widget/cheatsheet.pdf
•   Better Font Stack:
    http://unitinteractive.com/blog/2008/06/25/better-css-font-stacks/
August 27, 2001
 IE6 released


                   8


                  http://www.stopie6.org/
Thanks!


Ben MacNeill
User Interface Designer, eXtension at NCSU
ben.macneill@extension.org

Slides and zipped Code examples:
http://www.slideshare.net/chillnc
http://drop.io/benmacneill

My CSS bookmarks:
http://del.icio.us/chillnc/css

Contenu connexe

Tendances

Back to the Basics - 2 - HTML & CSS
Back to the Basics - 2 - HTML & CSSBack to the Basics - 2 - HTML & CSS
Back to the Basics - 2 - HTML & CSSClint LaForest
 
DYNAMIC HYPERTEXT MARKUP LANGUAGE (DHTML) & CSS WITH Application of JavaScript
DYNAMIC HYPERTEXT MARKUP LANGUAGE (DHTML) & CSS WITH Application of JavaScriptDYNAMIC HYPERTEXT MARKUP LANGUAGE (DHTML) & CSS WITH Application of JavaScript
DYNAMIC HYPERTEXT MARKUP LANGUAGE (DHTML) & CSS WITH Application of JavaScriptSoumen Santra
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSSdanpaquette
 
Designing and Developing Windowed Interfaces for Web Apps
Designing and Developing Windowed Interfaces for Web AppsDesigning and Developing Windowed Interfaces for Web Apps
Designing and Developing Windowed Interfaces for Web AppsSteve Smith
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web DesignChiheb Chebbi
 
Artdm171 Week3 Tags Group Projects
Artdm171 Week3 Tags Group ProjectsArtdm171 Week3 Tags Group Projects
Artdm171 Week3 Tags Group Projectsguestca5654
 
Web designing training in chandigarh
Web designing training in chandigarhWeb designing training in chandigarh
Web designing training in chandigarhSheetal Sharma
 
CSS3 + Progressive Enhancement
CSS3 + Progressive EnhancementCSS3 + Progressive Enhancement
CSS3 + Progressive EnhancementTakeru Suzuki
 
Shaping Up With CSS
Shaping Up With CSSShaping Up With CSS
Shaping Up With CSSsdireland
 
Presentation on CSS !!Designed By Sunaina
Presentation on CSS   !!Designed By SunainaPresentation on CSS   !!Designed By Sunaina
Presentation on CSS !!Designed By SunainaBatra Computer Centre
 
Week1 Dreamweaver and Server
Week1 Dreamweaver and ServerWeek1 Dreamweaver and Server
Week1 Dreamweaver and ServerRowena LI
 
Web Development Basics: HOW TO in HTML
Web Development Basics: HOW TO in HTMLWeb Development Basics: HOW TO in HTML
Web Development Basics: HOW TO in HTMLDer Lo
 
Doing More with LESS for CSS
Doing More with LESS for CSSDoing More with LESS for CSS
Doing More with LESS for CSSTodd Anglin
 
The Absolute Problem
The Absolute ProblemThe Absolute Problem
The Absolute Problemsdireland
 

Tendances (20)

Back to the Basics - 2 - HTML & CSS
Back to the Basics - 2 - HTML & CSSBack to the Basics - 2 - HTML & CSS
Back to the Basics - 2 - HTML & CSS
 
DYNAMIC HYPERTEXT MARKUP LANGUAGE (DHTML) & CSS WITH Application of JavaScript
DYNAMIC HYPERTEXT MARKUP LANGUAGE (DHTML) & CSS WITH Application of JavaScriptDYNAMIC HYPERTEXT MARKUP LANGUAGE (DHTML) & CSS WITH Application of JavaScript
DYNAMIC HYPERTEXT MARKUP LANGUAGE (DHTML) & CSS WITH Application of JavaScript
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
 
CSS
CSSCSS
CSS
 
Designing and Developing Windowed Interfaces for Web Apps
Designing and Developing Windowed Interfaces for Web AppsDesigning and Developing Windowed Interfaces for Web Apps
Designing and Developing Windowed Interfaces for Web Apps
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
The Dark Arts of CSS
The Dark Arts of CSSThe Dark Arts of CSS
The Dark Arts of CSS
 
Artdm171 Week3 Tags Group Projects
Artdm171 Week3 Tags Group ProjectsArtdm171 Week3 Tags Group Projects
Artdm171 Week3 Tags Group Projects
 
Web designing training in chandigarh
Web designing training in chandigarhWeb designing training in chandigarh
Web designing training in chandigarh
 
CSS3 + Progressive Enhancement
CSS3 + Progressive EnhancementCSS3 + Progressive Enhancement
CSS3 + Progressive Enhancement
 
NEPA BlogCon 2013 - HTML5/CSS3 for Bloggers
NEPA BlogCon 2013 -  HTML5/CSS3 for BloggersNEPA BlogCon 2013 -  HTML5/CSS3 for Bloggers
NEPA BlogCon 2013 - HTML5/CSS3 for Bloggers
 
Shaping Up With CSS
Shaping Up With CSSShaping Up With CSS
Shaping Up With CSS
 
HTML 5 and CSS 3
HTML 5 and CSS 3HTML 5 and CSS 3
HTML 5 and CSS 3
 
Introduccion a HTML5
Introduccion a HTML5Introduccion a HTML5
Introduccion a HTML5
 
Presentation on CSS !!Designed By Sunaina
Presentation on CSS   !!Designed By SunainaPresentation on CSS   !!Designed By Sunaina
Presentation on CSS !!Designed By Sunaina
 
Week1 Dreamweaver and Server
Week1 Dreamweaver and ServerWeek1 Dreamweaver and Server
Week1 Dreamweaver and Server
 
Web Development Basics: HOW TO in HTML
Web Development Basics: HOW TO in HTMLWeb Development Basics: HOW TO in HTML
Web Development Basics: HOW TO in HTML
 
Doing More with LESS for CSS
Doing More with LESS for CSSDoing More with LESS for CSS
Doing More with LESS for CSS
 
Your first HTML File
Your first HTML FileYour first HTML File
Your first HTML File
 
The Absolute Problem
The Absolute ProblemThe Absolute Problem
The Absolute Problem
 

En vedette

Finding Your Web Content Balance
Finding Your Web Content BalanceFinding Your Web Content Balance
Finding Your Web Content BalanceLisa Maria Martin
 
Content Web Parts Presentation from SPFest Chicago
Content Web Parts Presentation from SPFest ChicagoContent Web Parts Presentation from SPFest Chicago
Content Web Parts Presentation from SPFest ChicagoKim Frehe
 
Web Content Strategy for Libraries
Web Content Strategy for LibrariesWeb Content Strategy for Libraries
Web Content Strategy for LibrariesChris Evjy
 
Content Development Process of Beling.co
Content Development Process of Beling.coContent Development Process of Beling.co
Content Development Process of Beling.coSuci Fadhilah
 
Writing Web Content that Works
Writing Web Content that WorksWriting Web Content that Works
Writing Web Content that WorksGinny Redish
 
Best Practices for Structuring Your Web Content
Best Practices for Structuring Your  Web ContentBest Practices for Structuring Your  Web Content
Best Practices for Structuring Your Web ContentBen MacNeill
 
A Practical Guide to Awesome Web Writing
A Practical Guide to Awesome Web WritingA Practical Guide to Awesome Web Writing
A Practical Guide to Awesome Web WritingMandi Wise
 
Web Content Development Process - Best Practices
Web Content Development Process - Best PracticesWeb Content Development Process - Best Practices
Web Content Development Process - Best PracticesArnaud Dasprez
 

En vedette (10)

Finding Your Web Content Balance
Finding Your Web Content BalanceFinding Your Web Content Balance
Finding Your Web Content Balance
 
Content Web Parts Presentation from SPFest Chicago
Content Web Parts Presentation from SPFest ChicagoContent Web Parts Presentation from SPFest Chicago
Content Web Parts Presentation from SPFest Chicago
 
Web Content Guide
Web Content Guide Web Content Guide
Web Content Guide
 
Web Content Strategy for Libraries
Web Content Strategy for LibrariesWeb Content Strategy for Libraries
Web Content Strategy for Libraries
 
Content Development Process of Beling.co
Content Development Process of Beling.coContent Development Process of Beling.co
Content Development Process of Beling.co
 
Writing Web Content that Works
Writing Web Content that WorksWriting Web Content that Works
Writing Web Content that Works
 
Best Practices for Structuring Your Web Content
Best Practices for Structuring Your  Web ContentBest Practices for Structuring Your  Web Content
Best Practices for Structuring Your Web Content
 
A Practical Guide to Awesome Web Writing
A Practical Guide to Awesome Web WritingA Practical Guide to Awesome Web Writing
A Practical Guide to Awesome Web Writing
 
Web Content Development Process - Best Practices
Web Content Development Process - Best PracticesWeb Content Development Process - Best Practices
Web Content Development Process - Best Practices
 
Web Content Writing Samples
Web Content Writing SamplesWeb Content Writing Samples
Web Content Writing Samples
 

Similaire à Style Your Site Part 1

Style Your Site Part 2
Style Your Site Part 2Style Your Site Part 2
Style Your Site Part 2Ben MacNeill
 
Cascading Style Sheets - Part 01
Cascading Style Sheets - Part 01Cascading Style Sheets - Part 01
Cascading Style Sheets - Part 01Hatem Mahmoud
 
Making Your Site Look Great in IE7
Making Your Site Look Great in IE7Making Your Site Look Great in IE7
Making Your Site Look Great in IE7goodfriday
 
Highly Maintainable, Efficient, and Optimized CSS
Highly Maintainable, Efficient, and Optimized CSSHighly Maintainable, Efficient, and Optimized CSS
Highly Maintainable, Efficient, and Optimized CSSZoe Gillenwater
 
Basics of Rich Internet Applications
Basics of Rich Internet ApplicationsBasics of Rich Internet Applications
Basics of Rich Internet ApplicationsSubramanyan Murali
 
Adobe MAX 2008: HTML/CSS + Fireworks
Adobe MAX 2008: HTML/CSS + FireworksAdobe MAX 2008: HTML/CSS + Fireworks
Adobe MAX 2008: HTML/CSS + FireworksNathan Smith
 
Teams, styles and scalable applications
Teams, styles and scalable applicationsTeams, styles and scalable applications
Teams, styles and scalable applicationsVittorio Vittori
 
The Future Of CSS
The Future Of CSSThe Future Of CSS
The Future Of CSSAndy Budd
 
A Work Day Of A Web Developer
A Work Day Of A Web DeveloperA Work Day Of A Web Developer
A Work Day Of A Web DeveloperEdureka!
 
Advance Css 1194323118268797 5
Advance Css 1194323118268797 5Advance Css 1194323118268797 5
Advance Css 1194323118268797 5dharshyamal
 
Advance Css
Advance CssAdvance Css
Advance Cssvijayta
 

Similaire à Style Your Site Part 1 (20)

Style Your Site Part 2
Style Your Site Part 2Style Your Site Part 2
Style Your Site Part 2
 
Professional Css
Professional CssProfessional Css
Professional Css
 
Cascading Style Sheets - Part 01
Cascading Style Sheets - Part 01Cascading Style Sheets - Part 01
Cascading Style Sheets - Part 01
 
The Future of CSS
The Future of CSSThe Future of CSS
The Future of CSS
 
Coding the UI
Coding the UICoding the UI
Coding the UI
 
Coding Ui
Coding UiCoding Ui
Coding Ui
 
Making Your Site Look Great in IE7
Making Your Site Look Great in IE7Making Your Site Look Great in IE7
Making Your Site Look Great in IE7
 
Team styles
Team stylesTeam styles
Team styles
 
Highly Maintainable, Efficient, and Optimized CSS
Highly Maintainable, Efficient, and Optimized CSSHighly Maintainable, Efficient, and Optimized CSS
Highly Maintainable, Efficient, and Optimized CSS
 
Basics of Rich Internet Applications
Basics of Rich Internet ApplicationsBasics of Rich Internet Applications
Basics of Rich Internet Applications
 
Adobe MAX 2008: HTML/CSS + Fireworks
Adobe MAX 2008: HTML/CSS + FireworksAdobe MAX 2008: HTML/CSS + Fireworks
Adobe MAX 2008: HTML/CSS + Fireworks
 
Teams, styles and scalable applications
Teams, styles and scalable applicationsTeams, styles and scalable applications
Teams, styles and scalable applications
 
The Future Of CSS
The Future Of CSSThe Future Of CSS
The Future Of CSS
 
HTML CSS & Javascript
HTML CSS & JavascriptHTML CSS & Javascript
HTML CSS & Javascript
 
Using a CSS Framework
Using a CSS FrameworkUsing a CSS Framework
Using a CSS Framework
 
A Work Day Of A Web Developer
A Work Day Of A Web DeveloperA Work Day Of A Web Developer
A Work Day Of A Web Developer
 
Advance Css 1194323118268797 5
Advance Css 1194323118268797 5Advance Css 1194323118268797 5
Advance Css 1194323118268797 5
 
Advance Css
Advance CssAdvance Css
Advance Css
 
6 css week12 2020 2021 for g10
6 css week12 2020 2021 for g106 css week12 2020 2021 for g10
6 css week12 2020 2021 for g10
 
Html5
Html5Html5
Html5
 

Plus de Ben MacNeill

CSS Frameworks for Rapid Site Designs
CSS Frameworks for Rapid Site DesignsCSS Frameworks for Rapid Site Designs
CSS Frameworks for Rapid Site DesignsBen MacNeill
 
Responsive web design
Responsive web designResponsive web design
Responsive web designBen MacNeill
 
Advanced Google Analytics Techniques
Advanced Google Analytics Techniques Advanced Google Analytics Techniques
Advanced Google Analytics Techniques Ben MacNeill
 
Google Analytics: Q&A
Google Analytics: Q&AGoogle Analytics: Q&A
Google Analytics: Q&ABen MacNeill
 
Data-driven parenting - Trixie Tracker
Data-driven parenting - Trixie TrackerData-driven parenting - Trixie Tracker
Data-driven parenting - Trixie TrackerBen MacNeill
 
Evaluate Content with Google Analytics (Oct 2009)
Evaluate Content with Google Analytics (Oct 2009)Evaluate Content with Google Analytics (Oct 2009)
Evaluate Content with Google Analytics (Oct 2009)Ben MacNeill
 
Subversion Clients for the Mac - svnX
Subversion Clients  for the Mac - svnXSubversion Clients  for the Mac - svnX
Subversion Clients for the Mac - svnXBen MacNeill
 
Presenting For Feedback
Presenting For FeedbackPresenting For Feedback
Presenting For FeedbackBen MacNeill
 
Presenting Visual Information(Notes)
Presenting Visual Information(Notes)Presenting Visual Information(Notes)
Presenting Visual Information(Notes)Ben MacNeill
 

Plus de Ben MacNeill (13)

CSS Frameworks for Rapid Site Designs
CSS Frameworks for Rapid Site DesignsCSS Frameworks for Rapid Site Designs
CSS Frameworks for Rapid Site Designs
 
Ask an Expert 2.0
Ask an Expert 2.0Ask an Expert 2.0
Ask an Expert 2.0
 
Responsive web design
Responsive web designResponsive web design
Responsive web design
 
Advanced Google Analytics Techniques
Advanced Google Analytics Techniques Advanced Google Analytics Techniques
Advanced Google Analytics Techniques
 
Oceans
OceansOceans
Oceans
 
Animals
AnimalsAnimals
Animals
 
Google Analytics: Q&A
Google Analytics: Q&AGoogle Analytics: Q&A
Google Analytics: Q&A
 
Html5
Html5Html5
Html5
 
Data-driven parenting - Trixie Tracker
Data-driven parenting - Trixie TrackerData-driven parenting - Trixie Tracker
Data-driven parenting - Trixie Tracker
 
Evaluate Content with Google Analytics (Oct 2009)
Evaluate Content with Google Analytics (Oct 2009)Evaluate Content with Google Analytics (Oct 2009)
Evaluate Content with Google Analytics (Oct 2009)
 
Subversion Clients for the Mac - svnX
Subversion Clients  for the Mac - svnXSubversion Clients  for the Mac - svnX
Subversion Clients for the Mac - svnX
 
Presenting For Feedback
Presenting For FeedbackPresenting For Feedback
Presenting For Feedback
 
Presenting Visual Information(Notes)
Presenting Visual Information(Notes)Presenting Visual Information(Notes)
Presenting Visual Information(Notes)
 

Dernier

General Simple Guide About AI in Design By: A.L. Samar Hossam ElDin
General Simple Guide About AI in Design By: A.L. Samar Hossam ElDinGeneral Simple Guide About AI in Design By: A.L. Samar Hossam ElDin
General Simple Guide About AI in Design By: A.L. Samar Hossam ElDinSamar Hossam ElDin Ahmed
 
ArtWaves 2024 - embracing Curves in Modern Homes
ArtWaves 2024 - embracing Curves in Modern HomesArtWaves 2024 - embracing Curves in Modern Homes
ArtWaves 2024 - embracing Curves in Modern HomesVellyslav Petrov
 
CAPITAL GATE CASE STUDY -regional case study.pdf
CAPITAL GATE CASE STUDY -regional case study.pdfCAPITAL GATE CASE STUDY -regional case study.pdf
CAPITAL GATE CASE STUDY -regional case study.pdfAlasAlthaher
 
NBA power point presentation final copy y
NBA power point presentation final copy yNBA power point presentation final copy y
NBA power point presentation final copy ysrajece
 
Karim apartment ideas 01 ppppppppppppppp
Karim apartment ideas 01 pppppppppppppppKarim apartment ideas 01 ppppppppppppppp
Karim apartment ideas 01 pppppppppppppppNadaMohammed714321
 
FW25-26 Knit Cut & Sew Trend Book Peclers Paris
FW25-26 Knit Cut & Sew Trend Book Peclers ParisFW25-26 Knit Cut & Sew Trend Book Peclers Paris
FW25-26 Knit Cut & Sew Trend Book Peclers ParisPeclers Paris
 
Making and Unmaking of Chandigarh - A City of Two Plans2-4-24.ppt
Making and Unmaking of Chandigarh - A City of Two Plans2-4-24.pptMaking and Unmaking of Chandigarh - A City of Two Plans2-4-24.ppt
Making and Unmaking of Chandigarh - A City of Two Plans2-4-24.pptJIT KUMAR GUPTA
 
Piece by Piece Magazine
Piece by Piece Magazine                      Piece by Piece Magazine
Piece by Piece Magazine CharlottePulte
 
TIMBRE: HOW MIGHT WE REMEDY MUSIC DESERTS AND FACILITATE GROWTH OF A MUSICAL ...
TIMBRE: HOW MIGHT WE REMEDY MUSIC DESERTS AND FACILITATE GROWTH OF A MUSICAL ...TIMBRE: HOW MIGHT WE REMEDY MUSIC DESERTS AND FACILITATE GROWTH OF A MUSICAL ...
TIMBRE: HOW MIGHT WE REMEDY MUSIC DESERTS AND FACILITATE GROWTH OF A MUSICAL ...Pranav Subramanian
 
Imagist3D Architectural and Interior Rendering Portfolio
Imagist3D Architectural and Interior Rendering PortfolioImagist3D Architectural and Interior Rendering Portfolio
Imagist3D Architectural and Interior Rendering PortfolioAlinaLau2
 
LIGHTSCAPES: HOW MIGHT WE DESIGN AN INCLUSIVE AND ACCESSIBLE CLASSICAL CONCER...
LIGHTSCAPES: HOW MIGHT WE DESIGN AN INCLUSIVE AND ACCESSIBLE CLASSICAL CONCER...LIGHTSCAPES: HOW MIGHT WE DESIGN AN INCLUSIVE AND ACCESSIBLE CLASSICAL CONCER...
LIGHTSCAPES: HOW MIGHT WE DESIGN AN INCLUSIVE AND ACCESSIBLE CLASSICAL CONCER...Pranav Subramanian
 
The spirit of digital place - game worlds and architectural phenomenology
The spirit of digital place - game worlds and architectural phenomenologyThe spirit of digital place - game worlds and architectural phenomenology
The spirit of digital place - game worlds and architectural phenomenologyChristopher Totten
 
Map of St. Louis Parks
Map of St. Louis Parks                              Map of St. Louis Parks
Map of St. Louis Parks CharlottePulte
 
Niintendo Wii Presentation Template.pptx
Niintendo Wii Presentation Template.pptxNiintendo Wii Presentation Template.pptx
Niintendo Wii Presentation Template.pptxKevinYaelJimnezSanti
 
ALISIA: HOW MIGHT WE ACHIEVE HIGH ENVIRONMENTAL PERFORMANCE WHILE MAINTAINING...
ALISIA: HOW MIGHT WE ACHIEVE HIGH ENVIRONMENTAL PERFORMANCE WHILE MAINTAINING...ALISIA: HOW MIGHT WE ACHIEVE HIGH ENVIRONMENTAL PERFORMANCE WHILE MAINTAINING...
ALISIA: HOW MIGHT WE ACHIEVE HIGH ENVIRONMENTAL PERFORMANCE WHILE MAINTAINING...Pranav Subramanian
 
Interior Design for Office a cura di RMG Project Studio
Interior Design for Office a cura di RMG Project StudioInterior Design for Office a cura di RMG Project Studio
Interior Design for Office a cura di RMG Project StudioRMG Project Studio
 
Sharif's 9-BOX Monitoring Model for Adaptive Programme Management
Sharif's 9-BOX Monitoring Model for Adaptive Programme ManagementSharif's 9-BOX Monitoring Model for Adaptive Programme Management
Sharif's 9-BOX Monitoring Model for Adaptive Programme ManagementMd. Shariful Hoque
 
Exploring Tehran's Architectural Marvels: A Glimpse into Vilaas Studio's Dyna...
Exploring Tehran's Architectural Marvels: A Glimpse into Vilaas Studio's Dyna...Exploring Tehran's Architectural Marvels: A Glimpse into Vilaas Studio's Dyna...
Exploring Tehran's Architectural Marvels: A Glimpse into Vilaas Studio's Dyna...Yantram Animation Studio Corporation
 
10 must-have Chrome extensions for designers
10 must-have Chrome extensions for designers10 must-have Chrome extensions for designers
10 must-have Chrome extensions for designersPixeldarts
 

Dernier (20)

General Simple Guide About AI in Design By: A.L. Samar Hossam ElDin
General Simple Guide About AI in Design By: A.L. Samar Hossam ElDinGeneral Simple Guide About AI in Design By: A.L. Samar Hossam ElDin
General Simple Guide About AI in Design By: A.L. Samar Hossam ElDin
 
ArtWaves 2024 - embracing Curves in Modern Homes
ArtWaves 2024 - embracing Curves in Modern HomesArtWaves 2024 - embracing Curves in Modern Homes
ArtWaves 2024 - embracing Curves in Modern Homes
 
CAPITAL GATE CASE STUDY -regional case study.pdf
CAPITAL GATE CASE STUDY -regional case study.pdfCAPITAL GATE CASE STUDY -regional case study.pdf
CAPITAL GATE CASE STUDY -regional case study.pdf
 
NBA power point presentation final copy y
NBA power point presentation final copy yNBA power point presentation final copy y
NBA power point presentation final copy y
 
Karim apartment ideas 01 ppppppppppppppp
Karim apartment ideas 01 pppppppppppppppKarim apartment ideas 01 ppppppppppppppp
Karim apartment ideas 01 ppppppppppppppp
 
FW25-26 Knit Cut & Sew Trend Book Peclers Paris
FW25-26 Knit Cut & Sew Trend Book Peclers ParisFW25-26 Knit Cut & Sew Trend Book Peclers Paris
FW25-26 Knit Cut & Sew Trend Book Peclers Paris
 
Making and Unmaking of Chandigarh - A City of Two Plans2-4-24.ppt
Making and Unmaking of Chandigarh - A City of Two Plans2-4-24.pptMaking and Unmaking of Chandigarh - A City of Two Plans2-4-24.ppt
Making and Unmaking of Chandigarh - A City of Two Plans2-4-24.ppt
 
Piece by Piece Magazine
Piece by Piece Magazine                      Piece by Piece Magazine
Piece by Piece Magazine
 
TIMBRE: HOW MIGHT WE REMEDY MUSIC DESERTS AND FACILITATE GROWTH OF A MUSICAL ...
TIMBRE: HOW MIGHT WE REMEDY MUSIC DESERTS AND FACILITATE GROWTH OF A MUSICAL ...TIMBRE: HOW MIGHT WE REMEDY MUSIC DESERTS AND FACILITATE GROWTH OF A MUSICAL ...
TIMBRE: HOW MIGHT WE REMEDY MUSIC DESERTS AND FACILITATE GROWTH OF A MUSICAL ...
 
Imagist3D Architectural and Interior Rendering Portfolio
Imagist3D Architectural and Interior Rendering PortfolioImagist3D Architectural and Interior Rendering Portfolio
Imagist3D Architectural and Interior Rendering Portfolio
 
LIGHTSCAPES: HOW MIGHT WE DESIGN AN INCLUSIVE AND ACCESSIBLE CLASSICAL CONCER...
LIGHTSCAPES: HOW MIGHT WE DESIGN AN INCLUSIVE AND ACCESSIBLE CLASSICAL CONCER...LIGHTSCAPES: HOW MIGHT WE DESIGN AN INCLUSIVE AND ACCESSIBLE CLASSICAL CONCER...
LIGHTSCAPES: HOW MIGHT WE DESIGN AN INCLUSIVE AND ACCESSIBLE CLASSICAL CONCER...
 
The spirit of digital place - game worlds and architectural phenomenology
The spirit of digital place - game worlds and architectural phenomenologyThe spirit of digital place - game worlds and architectural phenomenology
The spirit of digital place - game worlds and architectural phenomenology
 
Map of St. Louis Parks
Map of St. Louis Parks                              Map of St. Louis Parks
Map of St. Louis Parks
 
Niintendo Wii Presentation Template.pptx
Niintendo Wii Presentation Template.pptxNiintendo Wii Presentation Template.pptx
Niintendo Wii Presentation Template.pptx
 
ALISIA: HOW MIGHT WE ACHIEVE HIGH ENVIRONMENTAL PERFORMANCE WHILE MAINTAINING...
ALISIA: HOW MIGHT WE ACHIEVE HIGH ENVIRONMENTAL PERFORMANCE WHILE MAINTAINING...ALISIA: HOW MIGHT WE ACHIEVE HIGH ENVIRONMENTAL PERFORMANCE WHILE MAINTAINING...
ALISIA: HOW MIGHT WE ACHIEVE HIGH ENVIRONMENTAL PERFORMANCE WHILE MAINTAINING...
 
ASME B31.4-2022 estandar ductos año 2022
ASME B31.4-2022 estandar ductos año 2022ASME B31.4-2022 estandar ductos año 2022
ASME B31.4-2022 estandar ductos año 2022
 
Interior Design for Office a cura di RMG Project Studio
Interior Design for Office a cura di RMG Project StudioInterior Design for Office a cura di RMG Project Studio
Interior Design for Office a cura di RMG Project Studio
 
Sharif's 9-BOX Monitoring Model for Adaptive Programme Management
Sharif's 9-BOX Monitoring Model for Adaptive Programme ManagementSharif's 9-BOX Monitoring Model for Adaptive Programme Management
Sharif's 9-BOX Monitoring Model for Adaptive Programme Management
 
Exploring Tehran's Architectural Marvels: A Glimpse into Vilaas Studio's Dyna...
Exploring Tehran's Architectural Marvels: A Glimpse into Vilaas Studio's Dyna...Exploring Tehran's Architectural Marvels: A Glimpse into Vilaas Studio's Dyna...
Exploring Tehran's Architectural Marvels: A Glimpse into Vilaas Studio's Dyna...
 
10 must-have Chrome extensions for designers
10 must-have Chrome extensions for designers10 must-have Chrome extensions for designers
10 must-have Chrome extensions for designers
 

Style Your Site Part 1

  • 1. Style Your Site A Comprehensive CSS Design Tutorial Ben MacNeill User Interface Designer, eXtension at NCSU http://commons.wikimedia.org/wiki/File:SkeletonsNumbers.png
  • 3.
  • 4.
  • 6. Why Use CSS? document document content presentation
  • 7. Some real reasons • Accessibility (Section 508 anyone?) • Reduce complexity/repetition in the markup • The Cosmetic stuff is all in one place. Global design changes are easy. • Your content is more portable for mobile devices, feed readers, printing • It's not 1999
  • 8. Simple, semantic html markup creates good structure Laying the Ground Work
  • 9. TABLES ARE FOR DATA NOT FOR LAYOUT
  • 10. CSS Syntax h1 {font-size: 1.5em} selectors values properties
  • 11. CSS Selectors type selector div ID selector div#feature Class selector div.comment ID + Class div#feature.audio
  • 12. First Session • Fixed-width layout • Flexible, bulletproof text-based navigation • Light design styling • Print stylesheet (if time)
  • 13. Second Session The Enhancing • CSS-based image sprites & background images • Fluid layout • Font control • CSS reset stylesheet • Convert form to semantic markup and style it • Mobile stylesheet for the iPhone
  • 14. Let’s Go to the Browser
  • 15. Important Concepts (Visual formatting model)
  • 16. The Display Property Every html element has a default display: property Block-level elements: <p>, <ul>, <div> Inline-level elements: <em>, <span>
  • 17. The Display Property Block-level elements are formatted visually as blocks. Inline-level elements are formatted visually as lines.
  • 18. The Cascade div {color: red;} div div {color: blue;} div div div {color: green;} • Each style rule (the selector) is assigned a weight • Most specific selector (greatest weight) wins
  • 19. Winning the Cascade • Most specific selector wins • If two selectors are equal, last one wins • inline styles beat style sheets • !important beats everything
  • 20. All Elements Are Not Equal div p div.feature p div#article p div#article.feature p • Classes and IDs carry more weight or specificity
  • 21. The Box Model http://www.flickr.com/photos/31288116@N02/3065654591/
  • 23. Shorthand margin: 10px 20px 30px 10px; top right bottom left margin: 10px 20px 20px; top sides bottom margin: 10px 20px; top/bottom sides margin: 10px; all
  • 24. Floating • Floated elements are taken out of the normal document flow and shifted to the left or right as far as it can go • elements following floated elements shift up and wrap unless cleared with the clear: property
  • 25. Tools & Testing • Firebug http://getfirebug.com/ • Web Developer Toolbar by Chris Pederick (Firefox) http://chrispederick.com/work/web-developer/ • Target: Firefox > Safari > IE8 > IE7
  • 26. Tip: Firebug can help with the Box Model
  • 27. CSS Selectors Cheat Sheet: www.cameronmoll.com/articles/widget/cheatsheet.pdf
  • 28. Better Font Stack: http://unitinteractive.com/blog/2008/06/25/better-css-font-stacks/
  • 29. August 27, 2001 IE6 released 8 http://www.stopie6.org/
  • 30. Thanks! Ben MacNeill User Interface Designer, eXtension at NCSU ben.macneill@extension.org Slides and zipped Code examples: http://www.slideshare.net/chillnc http://drop.io/benmacneill My CSS bookmarks: http://del.icio.us/chillnc/css