SlideShare a Scribd company logo
1 of 10
INTRO TO CSS
   Presented by Kyle Smith
       WordCamp 2012
WHAT IS CSS?
   CSS or Cascading Style Sheets is a programing
language designed to give HTML Markup dynamic
style and help arrange the content in a more usable
              and appealing manner.
STRUCTURE:
BOX MODEL
HOW DO WE WRITE IT?

    #content {
       width: 300px;
       height: 250px;
       background-color: #353535;
       padding: 10px 15px 20px 10px;
       margin: 0;
       color: red;
    }
TARGETING ELEMENTS
We can target specific content (or “elements”) in three different ways.
These can also be combined to be more specific in how we target them.

Element - This selects all of the instances of this
element within the document.

ID - This selects specific elements so that style only
effects a single instance. IDs select ONE item.

Classes - This selects more than one instance, like
elements, but more specifically. Classes select
MULTIPLE items.
CONCEPTS
Floating - The floating attribute takes elements out of the
flow of the document and moves them to the left or right.

Absolute Positioning - The Absolute attribute will take
also take items out of the flow of the document and
allow you to exactly place them.

Display - The Display attribute allows elements to take
on fixed shapes as well as hide them entirely.

Z-Index - The Z-Index attribute allows you to place
elements on top of each-other like papers in a stack.
BASIC ATTRIBUTES
Width: sets the width of an item
Height: sets the height of an item
Color: sets the color of text
Font-family: sets the font to be displayed
Padding: Sets the space between the content and the border
Margin: Sets the space outside of the border of the content
Float: Moves an element to the left or to the right
Clear: Removes the float inherited from the element above
Absolute: Removes the element from the flow to allow for exact
placement
Display: Defines how a certain element should be displayed
Background: Sets the background of an element, can be a color,
image or even transparent
SOME THINGS TO REMEMBER
If something doesn’t appear properly, check your css!


If something doesn’t appear at all, double check how
you are selecting it. IDs and Classes are not the same!

Keep your CSS organized! It will help you later if you
run in to a problem.
DEMO!

More Related Content

What's hot

Div Tag Tutorial
Div Tag TutorialDiv Tag Tutorial
Div Tag Tutorial
bav123
 
1 03 - CSS Introduction
1 03 - CSS Introduction1 03 - CSS Introduction
1 03 - CSS Introduction
apnwebdev
 
HTML Foundations, pt 3: Forms
HTML Foundations, pt 3: FormsHTML Foundations, pt 3: Forms
HTML Foundations, pt 3: Forms
Shawn Calvert
 

What's hot (20)

Css3
Css3Css3
Css3
 
Css
CssCss
Css
 
Beginners css tutorial for web designers
Beginners css tutorial for web designersBeginners css tutorial for web designers
Beginners css tutorial for web designers
 
Adobe InDesign cc Basics
Adobe InDesign cc BasicsAdobe InDesign cc Basics
Adobe InDesign cc Basics
 
Css ppt
Css pptCss ppt
Css ppt
 
CSS Basic Introduction, Rules, And Tips
CSS Basic Introduction, Rules, And TipsCSS Basic Introduction, Rules, And Tips
CSS Basic Introduction, Rules, And Tips
 
Div Tag Tutorial
Div Tag TutorialDiv Tag Tutorial
Div Tag Tutorial
 
Css3 Presetation
Css3 PresetationCss3 Presetation
Css3 Presetation
 
What is css
What is cssWhat is css
What is css
 
Css
CssCss
Css
 
1 03 - CSS Introduction
1 03 - CSS Introduction1 03 - CSS Introduction
1 03 - CSS Introduction
 
CSS Cascade Style Sheet
CSS Cascade Style SheetCSS Cascade Style Sheet
CSS Cascade Style Sheet
 
Intro html
Intro htmlIntro html
Intro html
 
Cascading style sheet
Cascading style sheetCascading style sheet
Cascading style sheet
 
CSS 101
CSS 101CSS 101
CSS 101
 
Adobe in design
Adobe in designAdobe in design
Adobe in design
 
CSS Part I
CSS Part ICSS Part I
CSS Part I
 
CSS
CSS CSS
CSS
 
HTML Foundations, pt 3: Forms
HTML Foundations, pt 3: FormsHTML Foundations, pt 3: Forms
HTML Foundations, pt 3: Forms
 
Css
CssCss
Css
 

Similar to Style With Kyle - Kyle Smith

Css jon duckett - flashcards
Css   jon duckett - flashcardsCss   jon duckett - flashcards
Css jon duckett - flashcards
Chirag Aggarwal
 
CSS Foundations, pt 2
CSS Foundations, pt 2CSS Foundations, pt 2
CSS Foundations, pt 2
Shawn Calvert
 
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
ZahouAmel1
 

Similar to Style With Kyle - Kyle Smith (20)

Intro to HTML and CSS basics
Intro to HTML and CSS basicsIntro to HTML and CSS basics
Intro to HTML and CSS basics
 
CascadingStyleSheets in ONESHOT By DeathCodeYT .pdf
CascadingStyleSheets  in ONESHOT By DeathCodeYT .pdfCascadingStyleSheets  in ONESHOT By DeathCodeYT .pdf
CascadingStyleSheets in ONESHOT By DeathCodeYT .pdf
 
Basic css
Basic cssBasic css
Basic css
 
CSS
CSSCSS
CSS
 
Designing for the web - 101
Designing for the web - 101Designing for the web - 101
Designing for the web - 101
 
Css jon duckett - flashcards
Css   jon duckett - flashcardsCss   jon duckett - flashcards
Css jon duckett - flashcards
 
Css
CssCss
Css
 
CSS Walktrough Internship Course
CSS Walktrough Internship CourseCSS Walktrough Internship Course
CSS Walktrough Internship Course
 
CSS Foundations, pt 2
CSS Foundations, pt 2CSS Foundations, pt 2
CSS Foundations, pt 2
 
How Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) WorksHow Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) Works
 
Css from scratch
Css from scratchCss from scratch
Css from scratch
 
CSS
CSSCSS
CSS
 
Working-With-The-Box-Model-Lesson-5.pptx
Working-With-The-Box-Model-Lesson-5.pptxWorking-With-The-Box-Model-Lesson-5.pptx
Working-With-The-Box-Model-Lesson-5.pptx
 
Html-Prabakaran
Html-PrabakaranHtml-Prabakaran
Html-Prabakaran
 
Art of css
Art of cssArt of css
Art of css
 
Cordova training - Day 2 Introduction to CSS 3
Cordova training - Day 2 Introduction to CSS 3Cordova training - Day 2 Introduction to CSS 3
Cordova training - Day 2 Introduction to CSS 3
 
19ESKIT058_5thSem.pptx
19ESKIT058_5thSem.pptx19ESKIT058_5thSem.pptx
19ESKIT058_5thSem.pptx
 
Css Introduction
Css IntroductionCss Introduction
Css Introduction
 
Introduction 2 css
Introduction 2 cssIntroduction 2 css
Introduction 2 css
 
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
 

More from wcfay

WCFay - Talking to Robots
WCFay - Talking to RobotsWCFay - Talking to Robots
WCFay - Talking to Robots
wcfay
 
Google analytics WordCamp Fayetteville
Google analytics WordCamp FayettevilleGoogle analytics WordCamp Fayetteville
Google analytics WordCamp Fayetteville
wcfay
 
Panel Discussion: WP Site Admin for Beginners
Panel Discussion: WP Site Admin for BeginnersPanel Discussion: WP Site Admin for Beginners
Panel Discussion: WP Site Admin for Beginners
wcfay
 
How to make money blogging. No, really!
How to make money blogging. No, really!How to make money blogging. No, really!
How to make money blogging. No, really!
wcfay
 
You madea sextape
You madea sextapeYou madea sextape
You madea sextape
wcfay
 
There's A Plugin For That!
There's A Plugin For That!There's A Plugin For That!
There's A Plugin For That!
wcfay
 

More from wcfay (13)

WCFay - Talking to Robots
WCFay - Talking to RobotsWCFay - Talking to Robots
WCFay - Talking to Robots
 
Cheaper than therapy wcf
Cheaper than therapy wcfCheaper than therapy wcf
Cheaper than therapy wcf
 
Video posting, wcfay 2012, Ben Pollock
Video posting, wcfay 2012, Ben PollockVideo posting, wcfay 2012, Ben Pollock
Video posting, wcfay 2012, Ben Pollock
 
Google analytics WordCamp Fayetteville
Google analytics WordCamp FayettevilleGoogle analytics WordCamp Fayetteville
Google analytics WordCamp Fayetteville
 
Panel Discussion: WP Site Admin for Beginners
Panel Discussion: WP Site Admin for BeginnersPanel Discussion: WP Site Admin for Beginners
Panel Discussion: WP Site Admin for Beginners
 
UX, UI, WTF
UX, UI, WTFUX, UI, WTF
UX, UI, WTF
 
The WordPress Entrepreneur
The WordPress Entrepreneur The WordPress Entrepreneur
The WordPress Entrepreneur
 
How to make money blogging. No, really!
How to make money blogging. No, really!How to make money blogging. No, really!
How to make money blogging. No, really!
 
Ramsey in the eye of the beholder wcfay final
Ramsey in the eye of the beholder wcfay finalRamsey in the eye of the beholder wcfay final
Ramsey in the eye of the beholder wcfay final
 
Wcfay kimanzi constable
Wcfay kimanzi constableWcfay kimanzi constable
Wcfay kimanzi constable
 
The Why and How of Multi Author Blogging
The Why and How of Multi Author BloggingThe Why and How of Multi Author Blogging
The Why and How of Multi Author Blogging
 
You madea sextape
You madea sextapeYou madea sextape
You madea sextape
 
There's A Plugin For That!
There's A Plugin For That!There's A Plugin For That!
There's A Plugin For That!
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Recently uploaded (20)

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

Style With Kyle - Kyle Smith

  • 1. INTRO TO CSS Presented by Kyle Smith WordCamp 2012
  • 2. WHAT IS CSS? CSS or Cascading Style Sheets is a programing language designed to give HTML Markup dynamic style and help arrange the content in a more usable and appealing manner.
  • 5. HOW DO WE WRITE IT? #content { width: 300px; height: 250px; background-color: #353535; padding: 10px 15px 20px 10px; margin: 0; color: red; }
  • 6. TARGETING ELEMENTS We can target specific content (or “elements”) in three different ways. These can also be combined to be more specific in how we target them. Element - This selects all of the instances of this element within the document. ID - This selects specific elements so that style only effects a single instance. IDs select ONE item. Classes - This selects more than one instance, like elements, but more specifically. Classes select MULTIPLE items.
  • 7. CONCEPTS Floating - The floating attribute takes elements out of the flow of the document and moves them to the left or right. Absolute Positioning - The Absolute attribute will take also take items out of the flow of the document and allow you to exactly place them. Display - The Display attribute allows elements to take on fixed shapes as well as hide them entirely. Z-Index - The Z-Index attribute allows you to place elements on top of each-other like papers in a stack.
  • 8. BASIC ATTRIBUTES Width: sets the width of an item Height: sets the height of an item Color: sets the color of text Font-family: sets the font to be displayed Padding: Sets the space between the content and the border Margin: Sets the space outside of the border of the content Float: Moves an element to the left or to the right Clear: Removes the float inherited from the element above Absolute: Removes the element from the flow to allow for exact placement Display: Defines how a certain element should be displayed Background: Sets the background of an element, can be a color, image or even transparent
  • 9. SOME THINGS TO REMEMBER If something doesn’t appear properly, check your css! If something doesn’t appear at all, double check how you are selecting it. IDs and Classes are not the same! Keep your CSS organized! It will help you later if you run in to a problem.
  • 10. DEMO!

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n