SlideShare ist ein Scribd-Unternehmen logo
1 von 22
Downloaden Sie, um offline zu lesen
Adding Style with CSS
                             The first steps to making your page look fab




Thursday, October 14, 2010
Before we start

                     • Install Firefox and Web Developer Toolbar
                     • Open http://doglr.com/base-css.html
                     • We will edit the CSS directly via WDT and
                             save the changes to /css/start-css.css




Thursday, October 14, 2010
What is CSS?
                     • Cascading Style Sheets
                     • The styles cascade. Generic rules are over
                             powered by more specific rules.
                     • The closer you get to the tag, the more
                             powerful the rule
                     • HTML provides structure, CSS provides
                             style


Thursday, October 14, 2010
CSS syntax

                     • selector {property:value; property:value;}
                     • selector selector {property:value;}
                     • selector.class {property:value}
                     • selector#id {property:value}

Thursday, October 14, 2010
The most basic rule

                     • * {color:black}
                     • * = everything
                     • color:black = make text black


Thursday, October 14, 2010
Style a container
                     • The uppermost container: html
                      • html {background: #000000; }
                      • #000000 = hexadecimal code for black
                      • #000 = #000000
                     • A specific container
                      • html body aside p {color:pink;}
Thursday, October 14, 2010
Id and Class
                     • An id can only be used once on a page.
                     • A class can be used multiple times
                     • Keep the names functional, not stylistic, i.e.
                             class=”intro” not class=”bigletter”
                     • header#hd = the header with id=”hd”
                     • p.first = the paragraph with class=”first”
Thursday, October 14, 2010
Popular CSS properties
                     • border: 1px solid red;
                     • margin: 10px 0 5px 10px; /* top, right,
                             bottom, left */
                     • background-color: yellow;
                     • width:500px;
                     • display:block;

Thursday, October 14, 2010
Fonts
                             Style for your text




Thursday, October 14, 2010
What is an em?
                     • The size of the letter m
                     • A proportional size, that allows the user to
                             resize the text.
                     • A better measurement for fonts and
                             container widths.
                     •

Thursday, October 14, 2010
What is a px?

                     • A single pixel.
                     • Proportional to the size of the screen.
                     • Good for objects that don’t resize, such as
                             images




Thursday, October 14, 2010
What is a pt?
                     • A point.
                     • Something used for printing on paper, not
                             the web.
                     • Often times you’ll see this for web display
                             and it’s not a good idea.
                     • 1px does not equal 1pt.

Thursday, October 14, 2010
Font Families

                     • Serifs have feet and tails. These are good
                             for reading paragraphs and large bodies of
                             text. They are mostly used on paper.

                     • Sans Serifs do not have feet and tails. These
                             are good for the web.

                     • Don’t use comic sans!

Thursday, October 14, 2010
Popular Font Rules
                     • font-family: woot, helvetica, arial, sans-serif;
                      • The browser will use the first font your
                             computer has available.
                     • font-size: 1.1 em;
                     • color: #808080;
                     • text-decoration:none;
Thursday, October 14, 2010
Layout Styles
                             Create grids and text flows




Thursday, October 14, 2010
Positioning
                             relative - absolute - fixed




Thursday, October 14, 2010
Position
                     • Position:relative; The object remains in the
                             content flow. This is a basic status, but is
                             not a default.
                     • Position:absolute; Position the item
                             absolutely to it’s closest relatively
                             positioned parent.
                     • Position:fixed; object is positioned
                             absolutely, but doesn’t move as the user
                             scrolls.
Thursday, October 14, 2010
Floating
                             Powerful grids and content flow




Thursday, October 14, 2010
Floats

                     • Float:left; /* or right */
                      • The object will move as far to one side as
                             it can. It stops when it hits something
                             solid.
                     • Clear:left /* or right, both */
                      • The object will drop below anything
                             previously floated

Thursday, October 14, 2010
Text Flow
                     • Text and other elements will flow around
                             an object that has been floated.
                     • This gives you the floated image effect.
                                      This text will
                                      flow around
                                the floated box.


Thursday, October 14, 2010
Next Class

                     • Why you should hate Internet Explorer
                     • How to use libraries
                     • Background images
                     • Intro to CSS3, pseudo-selectors, attribute
                             selectors...



Thursday, October 14, 2010
Resources

                     • http://csszengarden.com
                     • Subscribe to http://www.css-discuss.org/
                     • http://css.maxdesign.com.au/
                     • http://www.last-child.com/category/css/

Thursday, October 14, 2010

Weitere ähnliche Inhalte

Ähnlich wie Beginning css

Syracuse symposium11-17-2010
Syracuse symposium11-17-2010Syracuse symposium11-17-2010
Syracuse symposium11-17-2010Niki Brown
 
Improving Site Design and Usability
Improving Site Design and UsabilityImproving Site Design and Usability
Improving Site Design and Usabilitycouldbe studios
 
Vancouver WordPress Meetup - WordPress 101
Vancouver WordPress Meetup - WordPress 101Vancouver WordPress Meetup - WordPress 101
Vancouver WordPress Meetup - WordPress 101designfaire
 
Building Distributed JavaScript Widgets with jQuery
Building Distributed JavaScript Widgets with jQueryBuilding Distributed JavaScript Widgets with jQuery
Building Distributed JavaScript Widgets with jQuerybenvinegar
 
Collaboration over competition
Collaboration over competitionCollaboration over competition
Collaboration over competitionjoshuastrebel
 
Open Standards in the Walled Garden
Open Standards in the Walled GardenOpen Standards in the Walled Garden
Open Standards in the Walled Gardendigitalbindery
 
The Reluctant SysAdmin : 360|iDev Austin 2010
The Reluctant SysAdmin : 360|iDev Austin 2010The Reluctant SysAdmin : 360|iDev Austin 2010
The Reluctant SysAdmin : 360|iDev Austin 2010Voxilate
 
Introduction to CouchDB
Introduction to CouchDBIntroduction to CouchDB
Introduction to CouchDBJohn Wood
 
Debugging your JavaScript
Debugging your JavaScriptDebugging your JavaScript
Debugging your JavaScriptDiogo Antunes
 
Games Design 2 - Lecture 5 - Text
Games Design 2 - Lecture 5 - TextGames Design 2 - Lecture 5 - Text
Games Design 2 - Lecture 5 - TextDavid Farrell
 
Plone Conference 2010 – Where we go from here
Plone Conference 2010 – Where we go from herePlone Conference 2010 – Where we go from here
Plone Conference 2010 – Where we go from hereEric Steele
 
Web Development With Ruby - From Simple To Complex
Web Development With Ruby - From Simple To ComplexWeb Development With Ruby - From Simple To Complex
Web Development With Ruby - From Simple To ComplexBrian Hogan
 
HTML5 impact on application programming
HTML5 impact on application programmingHTML5 impact on application programming
HTML5 impact on application programmingEricsson Labs
 

Ähnlich wie Beginning css (15)

Syracuse symposium11-17-2010
Syracuse symposium11-17-2010Syracuse symposium11-17-2010
Syracuse symposium11-17-2010
 
Improving Site Design and Usability
Improving Site Design and UsabilityImproving Site Design and Usability
Improving Site Design and Usability
 
Vancouver WordPress Meetup - WordPress 101
Vancouver WordPress Meetup - WordPress 101Vancouver WordPress Meetup - WordPress 101
Vancouver WordPress Meetup - WordPress 101
 
Managing in an XML environment
Managing in an XML environmentManaging in an XML environment
Managing in an XML environment
 
Building Distributed JavaScript Widgets with jQuery
Building Distributed JavaScript Widgets with jQueryBuilding Distributed JavaScript Widgets with jQuery
Building Distributed JavaScript Widgets with jQuery
 
Collaboration over competition
Collaboration over competitionCollaboration over competition
Collaboration over competition
 
Basic Doc Design
Basic Doc DesignBasic Doc Design
Basic Doc Design
 
Open Standards in the Walled Garden
Open Standards in the Walled GardenOpen Standards in the Walled Garden
Open Standards in the Walled Garden
 
The Reluctant SysAdmin : 360|iDev Austin 2010
The Reluctant SysAdmin : 360|iDev Austin 2010The Reluctant SysAdmin : 360|iDev Austin 2010
The Reluctant SysAdmin : 360|iDev Austin 2010
 
Introduction to CouchDB
Introduction to CouchDBIntroduction to CouchDB
Introduction to CouchDB
 
Debugging your JavaScript
Debugging your JavaScriptDebugging your JavaScript
Debugging your JavaScript
 
Games Design 2 - Lecture 5 - Text
Games Design 2 - Lecture 5 - TextGames Design 2 - Lecture 5 - Text
Games Design 2 - Lecture 5 - Text
 
Plone Conference 2010 – Where we go from here
Plone Conference 2010 – Where we go from herePlone Conference 2010 – Where we go from here
Plone Conference 2010 – Where we go from here
 
Web Development With Ruby - From Simple To Complex
Web Development With Ruby - From Simple To ComplexWeb Development With Ruby - From Simple To Complex
Web Development With Ruby - From Simple To Complex
 
HTML5 impact on application programming
HTML5 impact on application programmingHTML5 impact on application programming
HTML5 impact on application programming
 

Mehr von Ted Drake

Introduce Trauma-Informed Design to Your Organization - CSUN ATC 2024
Introduce Trauma-Informed Design to Your Organization - CSUN ATC 2024Introduce Trauma-Informed Design to Your Organization - CSUN ATC 2024
Introduce Trauma-Informed Design to Your Organization - CSUN ATC 2024Ted Drake
 
Transforming Accessibility one lunch at a tiime - CSUN 2023
Transforming Accessibility one lunch at a tiime - CSUN 2023Transforming Accessibility one lunch at a tiime - CSUN 2023
Transforming Accessibility one lunch at a tiime - CSUN 2023Ted Drake
 
Inclusive Design for cognitive disabilities, neurodiversity, and chronic illness
Inclusive Design for cognitive disabilities, neurodiversity, and chronic illnessInclusive Design for cognitive disabilities, neurodiversity, and chronic illness
Inclusive Design for cognitive disabilities, neurodiversity, and chronic illnessTed Drake
 
Inclusive design for Long Covid
 Inclusive design for Long Covid  Inclusive design for Long Covid
Inclusive design for Long Covid Ted Drake
 
Covid 19, brain fog, and inclusive design
Covid 19, brain fog, and inclusive designCovid 19, brain fog, and inclusive design
Covid 19, brain fog, and inclusive designTed Drake
 
Customer obsession and accessibility
Customer obsession and accessibilityCustomer obsession and accessibility
Customer obsession and accessibilityTed Drake
 
The Saga of Accessible Colors
The Saga of Accessible ColorsThe Saga of Accessible Colors
The Saga of Accessible ColorsTed Drake
 
Artificial Intelligence and Accessibility - GAAD 2020 - Hello A11y
Artificial Intelligence and Accessibility - GAAD 2020 - Hello A11yArtificial Intelligence and Accessibility - GAAD 2020 - Hello A11y
Artificial Intelligence and Accessibility - GAAD 2020 - Hello A11yTed Drake
 
Expand your outreach with an accessibility champions program
Expand your outreach with an accessibility champions program Expand your outreach with an accessibility champions program
Expand your outreach with an accessibility champions program Ted Drake
 
Intuit's Accessibility Champion Program - Coaching and Celebrating
Intuit's Accessibility Champion Program - Coaching and Celebrating Intuit's Accessibility Champion Program - Coaching and Celebrating
Intuit's Accessibility Champion Program - Coaching and Celebrating Ted Drake
 
Accessibility First Innovation
Accessibility First InnovationAccessibility First Innovation
Accessibility First InnovationTed Drake
 
Inclusive customer interviews make it your friday task
Inclusive customer interviews  make it your friday taskInclusive customer interviews  make it your friday task
Inclusive customer interviews make it your friday taskTed Drake
 
Coaching and Celebrating Accessibility Champions
Coaching and Celebrating Accessibility ChampionsCoaching and Celebrating Accessibility Champions
Coaching and Celebrating Accessibility ChampionsTed Drake
 
Accessibility statements and resource publishing best practices csun 2019
Accessibility statements and resource publishing best practices   csun 2019Accessibility statements and resource publishing best practices   csun 2019
Accessibility statements and resource publishing best practices csun 2019Ted Drake
 
Raising Accessibility Awareness at Intuit
Raising Accessibility Awareness at IntuitRaising Accessibility Awareness at Intuit
Raising Accessibility Awareness at IntuitTed Drake
 
Trickle Down Accessibility
Trickle Down AccessibilityTrickle Down Accessibility
Trickle Down AccessibilityTed Drake
 
Trickle-Down Accessibility - CSUN 2018
Trickle-Down Accessibility - CSUN 2018Trickle-Down Accessibility - CSUN 2018
Trickle-Down Accessibility - CSUN 2018Ted Drake
 
Accessibility metrics Accessibility Data Metrics and Reporting – Industry Bes...
Accessibility metrics Accessibility Data Metrics and Reporting – Industry Bes...Accessibility metrics Accessibility Data Metrics and Reporting – Industry Bes...
Accessibility metrics Accessibility Data Metrics and Reporting – Industry Bes...Ted Drake
 
Mystery Meat 2.0 – Making hidden mobile interactions accessible
Mystery Meat 2.0 – Making hidden mobile interactions accessibleMystery Meat 2.0 – Making hidden mobile interactions accessible
Mystery Meat 2.0 – Making hidden mobile interactions accessibleTed Drake
 
React Native Accessibility - San Diego React and React Native Meetup
React Native Accessibility - San Diego React and React Native MeetupReact Native Accessibility - San Diego React and React Native Meetup
React Native Accessibility - San Diego React and React Native MeetupTed Drake
 

Mehr von Ted Drake (20)

Introduce Trauma-Informed Design to Your Organization - CSUN ATC 2024
Introduce Trauma-Informed Design to Your Organization - CSUN ATC 2024Introduce Trauma-Informed Design to Your Organization - CSUN ATC 2024
Introduce Trauma-Informed Design to Your Organization - CSUN ATC 2024
 
Transforming Accessibility one lunch at a tiime - CSUN 2023
Transforming Accessibility one lunch at a tiime - CSUN 2023Transforming Accessibility one lunch at a tiime - CSUN 2023
Transforming Accessibility one lunch at a tiime - CSUN 2023
 
Inclusive Design for cognitive disabilities, neurodiversity, and chronic illness
Inclusive Design for cognitive disabilities, neurodiversity, and chronic illnessInclusive Design for cognitive disabilities, neurodiversity, and chronic illness
Inclusive Design for cognitive disabilities, neurodiversity, and chronic illness
 
Inclusive design for Long Covid
 Inclusive design for Long Covid  Inclusive design for Long Covid
Inclusive design for Long Covid
 
Covid 19, brain fog, and inclusive design
Covid 19, brain fog, and inclusive designCovid 19, brain fog, and inclusive design
Covid 19, brain fog, and inclusive design
 
Customer obsession and accessibility
Customer obsession and accessibilityCustomer obsession and accessibility
Customer obsession and accessibility
 
The Saga of Accessible Colors
The Saga of Accessible ColorsThe Saga of Accessible Colors
The Saga of Accessible Colors
 
Artificial Intelligence and Accessibility - GAAD 2020 - Hello A11y
Artificial Intelligence and Accessibility - GAAD 2020 - Hello A11yArtificial Intelligence and Accessibility - GAAD 2020 - Hello A11y
Artificial Intelligence and Accessibility - GAAD 2020 - Hello A11y
 
Expand your outreach with an accessibility champions program
Expand your outreach with an accessibility champions program Expand your outreach with an accessibility champions program
Expand your outreach with an accessibility champions program
 
Intuit's Accessibility Champion Program - Coaching and Celebrating
Intuit's Accessibility Champion Program - Coaching and Celebrating Intuit's Accessibility Champion Program - Coaching and Celebrating
Intuit's Accessibility Champion Program - Coaching and Celebrating
 
Accessibility First Innovation
Accessibility First InnovationAccessibility First Innovation
Accessibility First Innovation
 
Inclusive customer interviews make it your friday task
Inclusive customer interviews  make it your friday taskInclusive customer interviews  make it your friday task
Inclusive customer interviews make it your friday task
 
Coaching and Celebrating Accessibility Champions
Coaching and Celebrating Accessibility ChampionsCoaching and Celebrating Accessibility Champions
Coaching and Celebrating Accessibility Champions
 
Accessibility statements and resource publishing best practices csun 2019
Accessibility statements and resource publishing best practices   csun 2019Accessibility statements and resource publishing best practices   csun 2019
Accessibility statements and resource publishing best practices csun 2019
 
Raising Accessibility Awareness at Intuit
Raising Accessibility Awareness at IntuitRaising Accessibility Awareness at Intuit
Raising Accessibility Awareness at Intuit
 
Trickle Down Accessibility
Trickle Down AccessibilityTrickle Down Accessibility
Trickle Down Accessibility
 
Trickle-Down Accessibility - CSUN 2018
Trickle-Down Accessibility - CSUN 2018Trickle-Down Accessibility - CSUN 2018
Trickle-Down Accessibility - CSUN 2018
 
Accessibility metrics Accessibility Data Metrics and Reporting – Industry Bes...
Accessibility metrics Accessibility Data Metrics and Reporting – Industry Bes...Accessibility metrics Accessibility Data Metrics and Reporting – Industry Bes...
Accessibility metrics Accessibility Data Metrics and Reporting – Industry Bes...
 
Mystery Meat 2.0 – Making hidden mobile interactions accessible
Mystery Meat 2.0 – Making hidden mobile interactions accessibleMystery Meat 2.0 – Making hidden mobile interactions accessible
Mystery Meat 2.0 – Making hidden mobile interactions accessible
 
React Native Accessibility - San Diego React and React Native Meetup
React Native Accessibility - San Diego React and React Native MeetupReact Native Accessibility - San Diego React and React Native Meetup
React Native Accessibility - San Diego React and React Native Meetup
 

Kürzlich hochgeladen

Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
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
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 

Kürzlich hochgeladen (20)

Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
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
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 

Beginning css

  • 1. Adding Style with CSS The first steps to making your page look fab Thursday, October 14, 2010
  • 2. Before we start • Install Firefox and Web Developer Toolbar • Open http://doglr.com/base-css.html • We will edit the CSS directly via WDT and save the changes to /css/start-css.css Thursday, October 14, 2010
  • 3. What is CSS? • Cascading Style Sheets • The styles cascade. Generic rules are over powered by more specific rules. • The closer you get to the tag, the more powerful the rule • HTML provides structure, CSS provides style Thursday, October 14, 2010
  • 4. CSS syntax • selector {property:value; property:value;} • selector selector {property:value;} • selector.class {property:value} • selector#id {property:value} Thursday, October 14, 2010
  • 5. The most basic rule • * {color:black} • * = everything • color:black = make text black Thursday, October 14, 2010
  • 6. Style a container • The uppermost container: html • html {background: #000000; } • #000000 = hexadecimal code for black • #000 = #000000 • A specific container • html body aside p {color:pink;} Thursday, October 14, 2010
  • 7. Id and Class • An id can only be used once on a page. • A class can be used multiple times • Keep the names functional, not stylistic, i.e. class=”intro” not class=”bigletter” • header#hd = the header with id=”hd” • p.first = the paragraph with class=”first” Thursday, October 14, 2010
  • 8. Popular CSS properties • border: 1px solid red; • margin: 10px 0 5px 10px; /* top, right, bottom, left */ • background-color: yellow; • width:500px; • display:block; Thursday, October 14, 2010
  • 9. Fonts Style for your text Thursday, October 14, 2010
  • 10. What is an em? • The size of the letter m • A proportional size, that allows the user to resize the text. • A better measurement for fonts and container widths. • Thursday, October 14, 2010
  • 11. What is a px? • A single pixel. • Proportional to the size of the screen. • Good for objects that don’t resize, such as images Thursday, October 14, 2010
  • 12. What is a pt? • A point. • Something used for printing on paper, not the web. • Often times you’ll see this for web display and it’s not a good idea. • 1px does not equal 1pt. Thursday, October 14, 2010
  • 13. Font Families • Serifs have feet and tails. These are good for reading paragraphs and large bodies of text. They are mostly used on paper. • Sans Serifs do not have feet and tails. These are good for the web. • Don’t use comic sans! Thursday, October 14, 2010
  • 14. Popular Font Rules • font-family: woot, helvetica, arial, sans-serif; • The browser will use the first font your computer has available. • font-size: 1.1 em; • color: #808080; • text-decoration:none; Thursday, October 14, 2010
  • 15. Layout Styles Create grids and text flows Thursday, October 14, 2010
  • 16. Positioning relative - absolute - fixed Thursday, October 14, 2010
  • 17. Position • Position:relative; The object remains in the content flow. This is a basic status, but is not a default. • Position:absolute; Position the item absolutely to it’s closest relatively positioned parent. • Position:fixed; object is positioned absolutely, but doesn’t move as the user scrolls. Thursday, October 14, 2010
  • 18. Floating Powerful grids and content flow Thursday, October 14, 2010
  • 19. Floats • Float:left; /* or right */ • The object will move as far to one side as it can. It stops when it hits something solid. • Clear:left /* or right, both */ • The object will drop below anything previously floated Thursday, October 14, 2010
  • 20. Text Flow • Text and other elements will flow around an object that has been floated. • This gives you the floated image effect. This text will flow around the floated box. Thursday, October 14, 2010
  • 21. Next Class • Why you should hate Internet Explorer • How to use libraries • Background images • Intro to CSS3, pseudo-selectors, attribute selectors... Thursday, October 14, 2010
  • 22. Resources • http://csszengarden.com • Subscribe to http://www.css-discuss.org/ • http://css.maxdesign.com.au/ • http://www.last-child.com/category/css/ Thursday, October 14, 2010