SlideShare a Scribd company logo
Embrace the MulletCSS is the Party in the Back(a CSS ‘how-to’)TOM HAPGOODWordCamp Fayetteville #wcfay / 2011
To those of you in the room still rocking the mullet, I salute your bravery and dedication to the glory years.
Embrace the Mullet: CSS is the 'Party in the Back' (a CSS How-to)
University of Arkansas Art Department, Design AreaWeb Design 1					// HTML5, CSS3, DW, PS, FW, etc.
Art of Interactive Journalism		// WP, FCP, PS, DW
Motion Design					// C4D, AE, AI, PS, FCP
Typography						// ID, PS, HTML5, CSS3http://www.hapgooddesign.com@thapgood
Embrace the Mullet: CSS is the 'Party in the Back' (a CSS How-to)
Embrace the Mullet: CSS is the 'Party in the Back' (a CSS How-to)
Embrace the Mullet: CSS is the 'Party in the Back' (a CSS How-to)
Embrace the Mullet: CSS is the 'Party in the Back' (a CSS How-to)
Embrace the Mullet: CSS is the 'Party in the Back' (a CSS How-to)
Embrace the Mullet: CSS is the 'Party in the Back' (a CSS How-to)
Embrace the Mullet: CSS is the 'Party in the Back' (a CSS How-to)
Structure + PresentationA key concept is to keep the structure and presentation separate (in separate files).structure:									presentation:HTML									CSSindex.htmlstyle.css
Embrace the Mullet: CSS is the 'Party in the Back' (a CSS How-to)
Often-Used CSS Properties{ font-family{ font-size{ font-weight{ font-style{ text-align{ color{ background-image{ background-color{ background-repeat{ padding{ margin{ float{ line-height{ letter-spacing{ border{ border-radius{ box-shadow{ text-transform{ text-shadow{ display{ position{ width{ height
marginpaddingborderContentpaddingpaddingmarginmarginpaddingThe Box Modelmargin
marginpaddingborderpaddingpaddingmarginmarginpaddingThe Box Modelmargin
marginpaddingborderpaddingpaddingmarginmarginpaddingThe Box Modelmargin
marginpaddingborderpaddingpaddingmarginmarginpaddingThe Box Modelmargin
PaddingNicki-G/FlickrThe contentThe padding
The paddingThe marginThe border
Linking the HTML and CSSBetween the <head> tags in the HTML document, the following line is inserted:<head>	<link rel=“stylesheet” href=“style.css”></head>(making sure that the path to the style.css file is correct.)
SyntaxHTML                      							CSS<body>	<h1>Hello, world.</h1></body>h1 {	font-size: large;	color: #003366;	padding: 20px;	}
CSS SyntaxA CSS rule consists of two main parts:selector { declaration;}
CSS SyntaxA CSS rule consists of two main parts:	selector { declaration;}				The declaration has two parts:selector { property: value; }
CSS SyntaxA CSS rule consists of two main parts:	selector { declaration;}				The declaration has two parts:selector { property: value; }selector { color: #000000; }
CSS Syntax / element type selectorStyling an existing HTML tag:To make all p (paragraph) tags on your page black:	p { color: #000000; }
HTML                      		index.html<html><body><link rel=“stylesheet” … ><h1>Headline</h1></body></html>
HTML                      		CSSstyle.cssindex.html<html><body><link rel=“stylesheet” … ><h1>Headline</h1></body></html>h1 { color:#003366;font-family:Georgia, serif;text-transform:uppercase;font-size:large;}
HTML                      		CSSstyle.cssindex.html<html><body><link rel=“stylesheet” … ><h1>Headline</h1></body></html>h1 { color:#003366;font-family:Georgia, serif;text-transform:uppercase;font-size:large;}HEADLINE
CSS Syntax / class selectorsWhat if you wanted some h1 tags to be blue and some red? Expand the existing tag set with the use of classes: Classes use the dot notation as below:	h1.breakingnews { color: #ff0000; }So, used whenever there is an h1 tag with a class of “breakingnews”.
HTML                      		index.html<html><body><link rel=“stylesheet” … > <h1>Headline</h1> <h1 class=“breakingnews”>This Just In!</h1></body></html>
HTML                      		CSSstyle.cssindex.html<html><body><link rel=“stylesheet” … > <h1>Headline</h1> <h1 class=“breakingnews”>This Just In!</h1></body></html>h1 { color:#003366;font-family:Georgia, serif;text-transform:uppercase;font-size:large;	}h1.breakingnews { color:#ff0000;font-family:Georgia, serif;text-transform:none;font-size:medium;	}
HTML                      		CSSstyle.cssindex.html<html><body><link rel=“stylesheet” … > <h1>Headline</h1> <h1 class=“breakingnews”>This Just In!</h1></body></html>h1 { color:#003366;font-family:Georgia, serif;text-transform:uppercase;font-size:large;}h1.breakingnews { color:#ff0000;font-family:Georgia, serif;text-transform:none;font-size:medium;	}HEADLINEThis Just In!
CSS Syntax / descendant selectorsWhat if you wanted some h1 tags to be blue, but only when they are inside of the <header> tag?: Descendant selectors look like this:	header  h1 { color: #003366; } orheader  .breakingnews{ color: #ff0000;}The h1 will only style blue when it’s nested inside the header tag:<header><h1>WordCamp</h1></header>
CSS Syntax / adjacent sibling selectorsWhat if you wanted some p tags to be bold, but only when they directly follow an h2? Use the + symbol:	h2+p { font-weight:bold; } The p will only style bold when directly follows the h2:<h2>Welcome to WordCamp!</h2><p>WordCamp (This will be bold)</p><p>OtherCamp (This will not be bold)</p>
Lots moreGeneral sibling selectors E~F	{ declarations; }Child selectors E>F {declarations; }Pseudo-classes li:hover, li:first-child, :nth-of-typePseudo-elements p:first-line, ::selection
Shorthandheader {border-width:1px;border-style: dashed;border-color: #ff0000;}
Shorthandheader {border:1px dashed #ff0000;}
Shorthandheader {border-right:1px dashed #ff0000;}
Shorthandheader {border-bottom:1px dashed #ff0000;}
Hexadecimal colorsIn mathematics and computer science, hexadecimal (also base 16, or hex) is a positional numeral system with a radix, or base, of 16.It uses sixteen distinct symbols, most often the symbols 0–9 to represent values zero to nine, and A, B, C, D, E, F (or alternatively a–f) to represent values ten to fifteen. For example, the hexadecimal number 2AF3 is equal, in decimal, to (2 × 163) + (10 × 162) + (15 × 161) + (3 × 160) , or 10,995.
Hexadecimal colorsA few to remember (the grayscales):#000000; /* black */#333333;#666666;#999999;#cccccc;#ffffff; /* white */(When each pairing is identical, it’s a gray).
When the HEX RGB pairings are identical, it’s a gray.
147 color names are defined in the HTML and CSS color specification (17 standard colors plus 130 more).
Layout with CSS
Layout with CSS
<header>Layout with CSS<div><div><footer>
<header>Layout with CSSWhat’s a div tag?It’s short for “division” and it’s a way to think about creating “areas” or “segments” or “portions” of the page. Visually, these end up looking like columns or any other boxes on the page.<div><div><footer>
<header>Layout with CSSWhat’s a div tag?It’s short for “division” and it’s a way to think about creating “areas” or “segments” or “portions” of the page. Visually, these end up looking like columns or any other boxes on the page.You may have many divs on a page, so you’ll need to give them a name, like this:					<div class=“promobox”><div><div><footer>
<header>Layout with CSSWhat’s a div tag?It’s short for “division” and it’s a way to think about creating “areas” or “segments” or “portions” of the page. Visually, these end up looking like columns or any other boxes on the page.You may have many divs on a page, so you’ll need to give them a name, like this:					<div class=“promobox”>Then, the CSS can talk directly to that div(s) for styling.<div><div><footer>
<header>Layout with CSSWhat’s a div tag?It’s short for “division” and it’s a way to think about creating “areas” or “segments” or “portions” of the page. Visually, these end up looking like columns or any other boxes on the page.You may have many divs on a page, so you’ll need to give them a name, like this:					<div class=“promobox”>Then, the CSS can talk directly to that div(s) for styling.				.promobox {							width:200px;							}<div><div><footer>
<header>Layout with CSS<div id=“main_nav”><div><footer>
<header>Layout with CSSWait, what’s an ID?Instead of giving an element, such as a div, a class name, you can give it an ID. An ID is used once per page. A class can be used many times on a page.Assigning an ID is very similar:					<div id=“main_nav”>Then, you can have the CSS talk directly to that div for styling.				#main_nav {							width:200px;							/* notice the # notation */							}<div id=“main_nav”><div><footer>
<header>Layout with CSSWait, what’s an ID?In other words, an ID is a unique identifier.I use an ID on a div when I’m certain that div is going to have a unique presence on the page, such as the main navigation or the page header.<div id=“main_nav”><div><footer>
<header>Layout with CSSWait, what’s an ID?In other words, an ID is a unique identifier.I use an ID on a div when I’m certain that div is going to have a unique presence on the page, such as the main navigation or the page header.Use a class designation on a div (or other element) that may be re-used on the page, such as a typographic treatment or multiple promotional boxes that sit in the sidebar.<div id=“main_nav”><div><footer>
<header>Layout with CSS<div id=“main_nav”>	<nav>		<ul>			<li>Link</li>	</ul></nav></div><div><footer>
<header>Layout with CSS<div id=“main_nav”>	<nav>		<ul>			<li>Link</li>	</ul></nav></div><div id=“content”><footer>
<header>Layout with CSS<div id=“main_nav”>	<nav>		<ul>			<li>Link</li>	</ul></nav></div><div id=“content”><section>	<h1>About Us</h1>	<p>We are a full-service blah blah blah.</p></section></div><footer>
<header id=“pageheader”>Layout with CSS<div id=“main_nav”>	<nav>		<ul>			<li>Link</li>	</ul></nav></div><div id=“content”><section>	<h1>About Us</h1>	<p>We are a full-service blah blah blah.</p></section></div><footer>
<header id=“pageheader”>Layout with CSS<div id=“main_nav”>	<nav>		<ul>			<li>Link</li>	</ul></nav></div><div id=“content”><section>	<h1>About Us</h1>	<p>We are a full-service blah blah blah.</p></section></div><footer id=“pagefooter”>
<header id=“pageheader”>Layout with CSSThe CSS#pageheader {  margin-bottom:10px;}<div id=“main_nav”>	<nav>		<ul>			<li>Link</li>	</ul></nav></div><div id=“content”><section>	<h1>About Us</h1>	<p>We are a full-service blah blah blah.</p></section></div><footer id=“pagefooter”>
<header id=“pageheader”>Layout with CSSThe CSS#pageheader {  margin-bottom:10px;}#main_nav { float:left;width:200px; }<div id=“main_nav”>	<nav>		<ul>			<li>Link</li>	</ul></nav></div><div id=“content”><section>	<h1>About Us</h1>	<p>We are a full-service blah blah blah.</p></section></div><footer id=“pagefooter”>
<header id=“pageheader”>Layout with CSSThe CSS#pageheader {  margin-bottom:10px;}#main_nav { float:left;width:200px; }#content {margin-left: 210px;}<div id=“main_nav”>	<nav>		<ul>			<li>Link</li>	</ul></nav></div><div id=“content”><section>	<h1>About Us</h1>	<p>We are a full-service blah blah blah.</p></section></div><footer id=“pagefooter”>
<header id=“pageheader”>Layout with CSSThe CSS#pageheader {  margin-bottom:10px;}#main_nav { float:left;width:200px; }#content {margin-left: 210px;}#pagefooter {clear: both;margin-top:10px;}<div id=“main_nav”>	<nav>		<ul>			<li>Link</li>	</ul></nav></div><div id=“content”><section>	<h1>About Us</h1>	<p>We are a full-service blah blah blah.</p></section></div><footer id=“pagefooter”>
A COOL, GREEN BOX WITH ROUNDED EDGES AND DROP SHADOW.HTML<body><header id=“pageheader”>	<h1>A cool, green box with 		some rounded edges and 		drop shadow.</h1>	</header></body>CSS#pageheader {	margin:30px;padding:35px;color: #fff;	background: #aac46b;	border:1px solid #91ab53;	text-transform: uppercase;box-shadow: 0px 6px 6px #666;	text-shadow: 0 0 2px #999;	border-radius: 14px;-moz-border-radius: 14px;/* other vendor prefixes here */}
A COOL, GREEN BOX WITH ROUNDED EDGES AND DROP SHADOW.HTML<body>	<header>		<h1>A cool, green box with 		some rounded edges and 		drop shadow.</h1>	</header></body>CSSheader  h1  {	margin:30px;padding:35px;color: #fff;	background: #aac46b;	border:1px solid #91ab53;	text-transform: uppercase;box-shadow: 0px 6px 6px #666;	text-shadow: 0 0 2px #999;	border-radius: 14px;-moz-border-radius: 14px;/* other vendor prefixes here */}
A COOL, GREEN BOX WITH ROUNDED EDGES AND DROP SHADOW.HTML<body>	<header>	<h1>A cool, green box with 		some rounded edges and 		drop shadow.</h1>	</header></body>CSSbody+header {	margin:30px;padding:35px;color: #fff;	background: #aac46b;	border:1px solid #91ab53;	text-transform: uppercase;box-shadow: 0px 6px 6px #666;	text-shadow: 0 0 2px #999;	border-radius: 14px;-moz-border-radius: 14px;/* other vendor prefixes here */}
Embrace the Mullet: CSS is the 'Party in the Back' (a CSS How-to)
HTML<body>	<aside>    <figure>	<imgsrc=“images/agassi.jpg”>    </figure></aside></body>CSSbody {background:#999999;}figure  img {	border:10px solid #ffffff;	box-shadow: 3px 3px 3px #333333;}
Embrace the Mullet: CSS is the 'Party in the Back' (a CSS How-to)
Embrace the Mullet: CSS is the 'Party in the Back' (a CSS How-to)
Embrace the Mullet: CSS is the 'Party in the Back' (a CSS How-to)
Embrace the Mullet: CSS is the 'Party in the Back' (a CSS How-to)
Embrace the Mullet: CSS is the 'Party in the Back' (a CSS How-to)
Embrace the Mullet: CSS is the 'Party in the Back' (a CSS How-to)
Embrace the Mullet: CSS is the 'Party in the Back' (a CSS How-to)
Embrace the Mullet: CSS is the 'Party in the Back' (a CSS How-to)
Embrace the Mullet: CSS is the 'Party in the Back' (a CSS How-to)
Embrace the Mullet: CSS is the 'Party in the Back' (a CSS How-to)
Embrace the Mullet: CSS is the 'Party in the Back' (a CSS How-to)
Embrace the Mullet: CSS is the 'Party in the Back' (a CSS How-to)
Thanks to Christopher Spencer (ca. 1987) for organizing WordCamp.
Mullet ResourcesGoogle: “mullet”

More Related Content

PPT
CSS Basics
ODP
Cascading Style Sheets - Part 01
PPT
PPT
Introduction To HTML
PPT
CSS Basics
Cascading Style Sheets - Part 01
Introduction To HTML

What's hot (19)

PPT
Introduction to Cascading Style Sheets
PPT
cascading style sheet ppt
PPT
CSS for Beginners
PPTX
Lecture 2 introduction to html
PPT
Introduction to html
PPT
Basics Of Css And Some Common Mistakes
PPTX
Html1
PDF
LAMP_TRAINING_SESSION_3
PPTX
Wdf 222chp iii vi
PPT
Html ppt
PPTX
PDF
Intro to html revised2
PPT
CSS For Online Journalism
PPTX
Html basic
PPT
Html tag
PPTX
Getting into HTML
PDF
Basic-CSS-tutorial
PPT
Html Intro2
PPTX
Introduction to Cascading Style Sheets
cascading style sheet ppt
CSS for Beginners
Lecture 2 introduction to html
Introduction to html
Basics Of Css And Some Common Mistakes
Html1
LAMP_TRAINING_SESSION_3
Wdf 222chp iii vi
Html ppt
Intro to html revised2
CSS For Online Journalism
Html basic
Html tag
Getting into HTML
Basic-CSS-tutorial
Html Intro2
Ad

Viewers also liked (20)

PPTX
Lessen groep 8
PDF
Progetto parco pubblico Esame corso garden design I progetto di giardino pubb...
PPT
Search Engine Advertising
DOC
-REPORT1_GEO (1)
PPT
PPS
Alaska
PPT
óLeo de coco para atletas
PDF
Coaching Clinic Tahap ke-2 Hari ke-5 Jakarta Football Festival - GrabBike Rus...
PPTX
Learning Method
PDF
SEDES DE LA XIII ONEM
PDF
RESULTADO DIRECTORES DE UGEL
PPT
Examinaos si esta en la fe
PDF
Progetto garden design di Alberto Farè Esame corso garden design 50 ore per c...
PDF
Mixing Mill - A story of woes to wows!!
PPTX
Chapter 2.datatypes and operators
PDF
2º sec registro-lectura entrada 1 y 2
PDF
Los principios del tesoro celestial
PPT
C++ functions
PPT
Tolerance Stackups Using Oracle Crystal Ball
PPTX
Function C++
Lessen groep 8
Progetto parco pubblico Esame corso garden design I progetto di giardino pubb...
Search Engine Advertising
-REPORT1_GEO (1)
Alaska
óLeo de coco para atletas
Coaching Clinic Tahap ke-2 Hari ke-5 Jakarta Football Festival - GrabBike Rus...
Learning Method
SEDES DE LA XIII ONEM
RESULTADO DIRECTORES DE UGEL
Examinaos si esta en la fe
Progetto garden design di Alberto Farè Esame corso garden design 50 ore per c...
Mixing Mill - A story of woes to wows!!
Chapter 2.datatypes and operators
2º sec registro-lectura entrada 1 y 2
Los principios del tesoro celestial
C++ functions
Tolerance Stackups Using Oracle Crystal Ball
Function C++
Ad

Similar to Embrace the Mullet: CSS is the 'Party in the Back' (a CSS How-to) (20)

PDF
Intro to HTML and CSS - Class 2 Slides
PPT
Make Css easy(part:2) : easy tips for css(part:2)
PPTX
uptu web technology unit 2 Css
PDF
Web Typography
PPT
PPT
CSS Part I
PDF
Introdução a CSS
PPT
Basic css
PPTX
Casecading Style Sheets for Hyper Text Transfer Protocol.pptx
PPT
Unit 2-CSS & Bootstrap.ppt
PDF
Css tutorial 2012
ODP
ODP
PDF
css-tutorial
PDF
css-tutorial
PPTX
PDF
Css tutorial by viveksingh698@gmail.com
PDF
Css tutorial
Intro to HTML and CSS - Class 2 Slides
Make Css easy(part:2) : easy tips for css(part:2)
uptu web technology unit 2 Css
Web Typography
CSS Part I
Introdução a CSS
Basic css
Casecading Style Sheets for Hyper Text Transfer Protocol.pptx
Unit 2-CSS & Bootstrap.ppt
Css tutorial 2012
css-tutorial
css-tutorial
Css tutorial by viveksingh698@gmail.com
Css tutorial

Recently uploaded (20)

PPT
EGWHermeneuticsffgggggggggggggggggggggggggggggggg.ppt
PPTX
Complete Guide to Microsoft PowerPoint 2019 – Features, Tools, and Tips"
PPT
unit 1 ppt.ppthhhhhhhhhhhhhhhhhhhhhhhhhh
PDF
High-frequency high-voltage transformer outline drawing
PDF
BRANDBOOK-Presidential Award Scheme-Kenya-2023
PPTX
AC-Unit1.pptx CRYPTOGRAPHIC NNNNFOR ALL
PPTX
Tenders & Contracts Works _ Services Afzal.pptx
PDF
Emailing DDDX-MBCaEiB.pdf DDD_Europe_2022_Intro_to_Context_Mapping_pdf-165590...
PPTX
ANATOMY OF ANTERIOR CHAMBER ANGLE AND GONIOSCOPY.pptx
PPTX
YV PROFILE PROJECTS PROFILE PRES. DESIGN
PPTX
6- Architecture design complete (1).pptx
PPTX
DOC-20250430-WA0014._20250714_235747_0000.pptx
PPTX
building Planning Overview for step wise design.pptx
PDF
Interior Structure and Construction A1 NGYANQI
PDF
GREEN BUILDING MATERIALS FOR SUISTAINABLE ARCHITECTURE AND BUILDING STUDY
DOCX
The story of the first moon landing.docx
PPTX
HPE Aruba-master-icon-library_052722.pptx
PPTX
Implications Existing phase plan and its feasibility.pptx
PPT
UNIT I- Yarn, types, explanation, process
PPTX
mahatma gandhi bus terminal in india Case Study.pptx
EGWHermeneuticsffgggggggggggggggggggggggggggggggg.ppt
Complete Guide to Microsoft PowerPoint 2019 – Features, Tools, and Tips"
unit 1 ppt.ppthhhhhhhhhhhhhhhhhhhhhhhhhh
High-frequency high-voltage transformer outline drawing
BRANDBOOK-Presidential Award Scheme-Kenya-2023
AC-Unit1.pptx CRYPTOGRAPHIC NNNNFOR ALL
Tenders & Contracts Works _ Services Afzal.pptx
Emailing DDDX-MBCaEiB.pdf DDD_Europe_2022_Intro_to_Context_Mapping_pdf-165590...
ANATOMY OF ANTERIOR CHAMBER ANGLE AND GONIOSCOPY.pptx
YV PROFILE PROJECTS PROFILE PRES. DESIGN
6- Architecture design complete (1).pptx
DOC-20250430-WA0014._20250714_235747_0000.pptx
building Planning Overview for step wise design.pptx
Interior Structure and Construction A1 NGYANQI
GREEN BUILDING MATERIALS FOR SUISTAINABLE ARCHITECTURE AND BUILDING STUDY
The story of the first moon landing.docx
HPE Aruba-master-icon-library_052722.pptx
Implications Existing phase plan and its feasibility.pptx
UNIT I- Yarn, types, explanation, process
mahatma gandhi bus terminal in india Case Study.pptx

Embrace the Mullet: CSS is the 'Party in the Back' (a CSS How-to)

  • 1. Embrace the MulletCSS is the Party in the Back(a CSS ‘how-to’)TOM HAPGOODWordCamp Fayetteville #wcfay / 2011
  • 2. To those of you in the room still rocking the mullet, I salute your bravery and dedication to the glory years.
  • 4. University of Arkansas Art Department, Design AreaWeb Design 1 // HTML5, CSS3, DW, PS, FW, etc.
  • 5. Art of Interactive Journalism // WP, FCP, PS, DW
  • 6. Motion Design // C4D, AE, AI, PS, FCP
  • 7. Typography // ID, PS, HTML5, CSS3http://www.hapgooddesign.com@thapgood
  • 15. Structure + PresentationA key concept is to keep the structure and presentation separate (in separate files).structure: presentation:HTML CSSindex.htmlstyle.css
  • 17. Often-Used CSS Properties{ font-family{ font-size{ font-weight{ font-style{ text-align{ color{ background-image{ background-color{ background-repeat{ padding{ margin{ float{ line-height{ letter-spacing{ border{ border-radius{ box-shadow{ text-transform{ text-shadow{ display{ position{ width{ height
  • 24. Linking the HTML and CSSBetween the <head> tags in the HTML document, the following line is inserted:<head> <link rel=“stylesheet” href=“style.css”></head>(making sure that the path to the style.css file is correct.)
  • 25. SyntaxHTML CSS<body> <h1>Hello, world.</h1></body>h1 { font-size: large; color: #003366; padding: 20px; }
  • 26. CSS SyntaxA CSS rule consists of two main parts:selector { declaration;}
  • 27. CSS SyntaxA CSS rule consists of two main parts: selector { declaration;} The declaration has two parts:selector { property: value; }
  • 28. CSS SyntaxA CSS rule consists of two main parts: selector { declaration;} The declaration has two parts:selector { property: value; }selector { color: #000000; }
  • 29. CSS Syntax / element type selectorStyling an existing HTML tag:To make all p (paragraph) tags on your page black: p { color: #000000; }
  • 30. HTML index.html<html><body><link rel=“stylesheet” … ><h1>Headline</h1></body></html>
  • 31. HTML CSSstyle.cssindex.html<html><body><link rel=“stylesheet” … ><h1>Headline</h1></body></html>h1 { color:#003366;font-family:Georgia, serif;text-transform:uppercase;font-size:large;}
  • 32. HTML CSSstyle.cssindex.html<html><body><link rel=“stylesheet” … ><h1>Headline</h1></body></html>h1 { color:#003366;font-family:Georgia, serif;text-transform:uppercase;font-size:large;}HEADLINE
  • 33. CSS Syntax / class selectorsWhat if you wanted some h1 tags to be blue and some red? Expand the existing tag set with the use of classes: Classes use the dot notation as below: h1.breakingnews { color: #ff0000; }So, used whenever there is an h1 tag with a class of “breakingnews”.
  • 34. HTML index.html<html><body><link rel=“stylesheet” … > <h1>Headline</h1> <h1 class=“breakingnews”>This Just In!</h1></body></html>
  • 35. HTML CSSstyle.cssindex.html<html><body><link rel=“stylesheet” … > <h1>Headline</h1> <h1 class=“breakingnews”>This Just In!</h1></body></html>h1 { color:#003366;font-family:Georgia, serif;text-transform:uppercase;font-size:large; }h1.breakingnews { color:#ff0000;font-family:Georgia, serif;text-transform:none;font-size:medium; }
  • 36. HTML CSSstyle.cssindex.html<html><body><link rel=“stylesheet” … > <h1>Headline</h1> <h1 class=“breakingnews”>This Just In!</h1></body></html>h1 { color:#003366;font-family:Georgia, serif;text-transform:uppercase;font-size:large;}h1.breakingnews { color:#ff0000;font-family:Georgia, serif;text-transform:none;font-size:medium; }HEADLINEThis Just In!
  • 37. CSS Syntax / descendant selectorsWhat if you wanted some h1 tags to be blue, but only when they are inside of the <header> tag?: Descendant selectors look like this: header h1 { color: #003366; } orheader .breakingnews{ color: #ff0000;}The h1 will only style blue when it’s nested inside the header tag:<header><h1>WordCamp</h1></header>
  • 38. CSS Syntax / adjacent sibling selectorsWhat if you wanted some p tags to be bold, but only when they directly follow an h2? Use the + symbol: h2+p { font-weight:bold; } The p will only style bold when directly follows the h2:<h2>Welcome to WordCamp!</h2><p>WordCamp (This will be bold)</p><p>OtherCamp (This will not be bold)</p>
  • 39. Lots moreGeneral sibling selectors E~F { declarations; }Child selectors E>F {declarations; }Pseudo-classes li:hover, li:first-child, :nth-of-typePseudo-elements p:first-line, ::selection
  • 44. Hexadecimal colorsIn mathematics and computer science, hexadecimal (also base 16, or hex) is a positional numeral system with a radix, or base, of 16.It uses sixteen distinct symbols, most often the symbols 0–9 to represent values zero to nine, and A, B, C, D, E, F (or alternatively a–f) to represent values ten to fifteen. For example, the hexadecimal number 2AF3 is equal, in decimal, to (2 × 163) + (10 × 162) + (15 × 161) + (3 × 160) , or 10,995.
  • 45. Hexadecimal colorsA few to remember (the grayscales):#000000; /* black */#333333;#666666;#999999;#cccccc;#ffffff; /* white */(When each pairing is identical, it’s a gray).
  • 46. When the HEX RGB pairings are identical, it’s a gray.
  • 47. 147 color names are defined in the HTML and CSS color specification (17 standard colors plus 130 more).
  • 51. <header>Layout with CSSWhat’s a div tag?It’s short for “division” and it’s a way to think about creating “areas” or “segments” or “portions” of the page. Visually, these end up looking like columns or any other boxes on the page.<div><div><footer>
  • 52. <header>Layout with CSSWhat’s a div tag?It’s short for “division” and it’s a way to think about creating “areas” or “segments” or “portions” of the page. Visually, these end up looking like columns or any other boxes on the page.You may have many divs on a page, so you’ll need to give them a name, like this: <div class=“promobox”><div><div><footer>
  • 53. <header>Layout with CSSWhat’s a div tag?It’s short for “division” and it’s a way to think about creating “areas” or “segments” or “portions” of the page. Visually, these end up looking like columns or any other boxes on the page.You may have many divs on a page, so you’ll need to give them a name, like this: <div class=“promobox”>Then, the CSS can talk directly to that div(s) for styling.<div><div><footer>
  • 54. <header>Layout with CSSWhat’s a div tag?It’s short for “division” and it’s a way to think about creating “areas” or “segments” or “portions” of the page. Visually, these end up looking like columns or any other boxes on the page.You may have many divs on a page, so you’ll need to give them a name, like this: <div class=“promobox”>Then, the CSS can talk directly to that div(s) for styling. .promobox { width:200px; }<div><div><footer>
  • 55. <header>Layout with CSS<div id=“main_nav”><div><footer>
  • 56. <header>Layout with CSSWait, what’s an ID?Instead of giving an element, such as a div, a class name, you can give it an ID. An ID is used once per page. A class can be used many times on a page.Assigning an ID is very similar: <div id=“main_nav”>Then, you can have the CSS talk directly to that div for styling. #main_nav { width:200px; /* notice the # notation */ }<div id=“main_nav”><div><footer>
  • 57. <header>Layout with CSSWait, what’s an ID?In other words, an ID is a unique identifier.I use an ID on a div when I’m certain that div is going to have a unique presence on the page, such as the main navigation or the page header.<div id=“main_nav”><div><footer>
  • 58. <header>Layout with CSSWait, what’s an ID?In other words, an ID is a unique identifier.I use an ID on a div when I’m certain that div is going to have a unique presence on the page, such as the main navigation or the page header.Use a class designation on a div (or other element) that may be re-used on the page, such as a typographic treatment or multiple promotional boxes that sit in the sidebar.<div id=“main_nav”><div><footer>
  • 59. <header>Layout with CSS<div id=“main_nav”> <nav> <ul> <li>Link</li> </ul></nav></div><div><footer>
  • 60. <header>Layout with CSS<div id=“main_nav”> <nav> <ul> <li>Link</li> </ul></nav></div><div id=“content”><footer>
  • 61. <header>Layout with CSS<div id=“main_nav”> <nav> <ul> <li>Link</li> </ul></nav></div><div id=“content”><section> <h1>About Us</h1> <p>We are a full-service blah blah blah.</p></section></div><footer>
  • 62. <header id=“pageheader”>Layout with CSS<div id=“main_nav”> <nav> <ul> <li>Link</li> </ul></nav></div><div id=“content”><section> <h1>About Us</h1> <p>We are a full-service blah blah blah.</p></section></div><footer>
  • 63. <header id=“pageheader”>Layout with CSS<div id=“main_nav”> <nav> <ul> <li>Link</li> </ul></nav></div><div id=“content”><section> <h1>About Us</h1> <p>We are a full-service blah blah blah.</p></section></div><footer id=“pagefooter”>
  • 64. <header id=“pageheader”>Layout with CSSThe CSS#pageheader { margin-bottom:10px;}<div id=“main_nav”> <nav> <ul> <li>Link</li> </ul></nav></div><div id=“content”><section> <h1>About Us</h1> <p>We are a full-service blah blah blah.</p></section></div><footer id=“pagefooter”>
  • 65. <header id=“pageheader”>Layout with CSSThe CSS#pageheader { margin-bottom:10px;}#main_nav { float:left;width:200px; }<div id=“main_nav”> <nav> <ul> <li>Link</li> </ul></nav></div><div id=“content”><section> <h1>About Us</h1> <p>We are a full-service blah blah blah.</p></section></div><footer id=“pagefooter”>
  • 66. <header id=“pageheader”>Layout with CSSThe CSS#pageheader { margin-bottom:10px;}#main_nav { float:left;width:200px; }#content {margin-left: 210px;}<div id=“main_nav”> <nav> <ul> <li>Link</li> </ul></nav></div><div id=“content”><section> <h1>About Us</h1> <p>We are a full-service blah blah blah.</p></section></div><footer id=“pagefooter”>
  • 67. <header id=“pageheader”>Layout with CSSThe CSS#pageheader { margin-bottom:10px;}#main_nav { float:left;width:200px; }#content {margin-left: 210px;}#pagefooter {clear: both;margin-top:10px;}<div id=“main_nav”> <nav> <ul> <li>Link</li> </ul></nav></div><div id=“content”><section> <h1>About Us</h1> <p>We are a full-service blah blah blah.</p></section></div><footer id=“pagefooter”>
  • 68. A COOL, GREEN BOX WITH ROUNDED EDGES AND DROP SHADOW.HTML<body><header id=“pageheader”> <h1>A cool, green box with some rounded edges and drop shadow.</h1> </header></body>CSS#pageheader { margin:30px;padding:35px;color: #fff; background: #aac46b; border:1px solid #91ab53; text-transform: uppercase;box-shadow: 0px 6px 6px #666; text-shadow: 0 0 2px #999; border-radius: 14px;-moz-border-radius: 14px;/* other vendor prefixes here */}
  • 69. A COOL, GREEN BOX WITH ROUNDED EDGES AND DROP SHADOW.HTML<body> <header> <h1>A cool, green box with some rounded edges and drop shadow.</h1> </header></body>CSSheader h1 { margin:30px;padding:35px;color: #fff; background: #aac46b; border:1px solid #91ab53; text-transform: uppercase;box-shadow: 0px 6px 6px #666; text-shadow: 0 0 2px #999; border-radius: 14px;-moz-border-radius: 14px;/* other vendor prefixes here */}
  • 70. A COOL, GREEN BOX WITH ROUNDED EDGES AND DROP SHADOW.HTML<body> <header> <h1>A cool, green box with some rounded edges and drop shadow.</h1> </header></body>CSSbody+header { margin:30px;padding:35px;color: #fff; background: #aac46b; border:1px solid #91ab53; text-transform: uppercase;box-shadow: 0px 6px 6px #666; text-shadow: 0 0 2px #999; border-radius: 14px;-moz-border-radius: 14px;/* other vendor prefixes here */}
  • 72. HTML<body> <aside> <figure> <imgsrc=“images/agassi.jpg”> </figure></aside></body>CSSbody {background:#999999;}figure img { border:10px solid #ffffff; box-shadow: 3px 3px 3px #333333;}
  • 85. Thanks to Christopher Spencer (ca. 1987) for organizing WordCamp.
  • 89. Maybe mock the ‘90s goatee next year…

Editor's Notes

  • #2: Based on my concept last year of the mullet hair style and its relationship to web markup (HTMLis the ‘business front’ and CSS is the ‘party in the back’), this presentation will be a demonstration on the fun and effectiveness of implementing graphic design with HTML and cascading style sheets, with special attention to CSS3 techniques.
  • #3: “To those of you in the room still rocking the mullet, I salute your bravery and dedication to the past.”
  • #4: Tom Hapgood in front of the Berlin Wall with a mullet, Monsters of Rock ‘86 (Mannheim) and pegged, torn jeans. The quintessential ‘80s picture.
  • #6: Rocky Grove Sun Company web site design and coding by Tom Hapgood, using WordPress and the Pods plugin. A project of Haden Interactive.
  • #7: Vertz and Company web site design and coding by Tom Hapgood, using WordPress and the Pods plugin. A project of Haden Interactive.
  • #8: Deutsch | Parker Design web site design and coding by Tom Hapgood, using WordPress and the Pods plugin.
  • #9: When a web page starts to load, it’s all business. HTML tags providing a skeleton structure for marking up the content. As the page continues to load in the browser, the browser reads the code very quickly line-by-line starting at the top. In this example, when it arrives at line 6, the browser is told to bring up some more files from “the back” and load them.
  • #10: This normal HTML page as it would load without style sheets.
  • #11: When lines 6 and 7 are loaded in, the party starts. Line 6 (and 7) is a call to bring out the style sheet and load it also, thereby giving the page its presentational elements such as color, layout, fonts and even drop shadows, animations and rounded edges.
  • #12: The same page with the style sheets loaded and all the color, layout and typography.
  • #14: A style sheet (CSS) file that provides presentation elements to the web page, such as typography, colors and layout.
  • #16: The Box Model. Students always seem to confuse padding and margins.
  • #17: The Box Model. Students always seem to confuse padding and margins.
  • #18: The Box Model. Students always seem to confuse padding and margins.
  • #19: The Box Model. Students always seem to confuse padding and margins. A video
  • #20: Students always seem to confuse padding and margins. You don’t want your content to get hurt by bouncing off the hard inside edges of the border, so you add padding.
  • #21: Another type of padded cell. Some basic elements of the box model. The margin is the space around a box or outside the border, or between two adjacent boxes pushing them apart. The padding goes inside the border, between the content and the border, while the margin goes outside the border.
  • #22: Linking the HTML and CSSBetween the &lt;head&gt; tags in the HTML document, the following line is inserted:&lt;head&gt; &lt;link rel=“stylesheet” href=“style.css”&gt;&lt;/head&gt;(making sure that the path to the style.css file is correct.)
  • #23: Linking the HTML and CSSBetween the &lt;head&gt; tags in the HTML document, the following line is inserted:&lt;head&gt; &lt;link rel=“stylesheet” href=“style.css”&gt;&lt;/head&gt;(making sure that the path to the style.css file is correct.)
  • #24: CSS SyntaxA CSS rule consists of two main parts: selector and declaration
  • #25: CSS SyntaxA CSS rule consists of two main parts: selector and declarationThe declaration has two parts: property and value
  • #26: CSS SyntaxA CSS rule consists of two main parts: selector and declarationThe declaration has two parts: property and valueFor instance, color: #000000 (black)
  • #27: CSS Syntax / element type selector, Styling an existing HTML tagTo make all p (paragraph) tags on your page black: p { color: #000000; }
  • #28: The basic relationship between an HTML page and a CSS document, and the basic styling of an h1 tag.
  • #29: The basic relationship between an HTML page and a CSS document, and the basic styling of an h1 tag.
  • #30: The basic relationship between an HTML page and a CSS document, and the basic styling of an h1 tag.
  • #31: What if you wanted some h1 tags to be blue and some red? Expand the existing tag set with the use of classes: Classes use the dot notation as below: h1.breakingnews { color: #ff0000; }
  • #32: Using a class to style the h1 tag in two different ways.
  • #33: The basic relationship between an HTML page and a CSS document, and the basic styling of an h1 tag.
  • #34: Using a class to style the h1 tag in two different ways.
  • #35: What if you wanted some h1 tags to be blue and some red? Expand the existing tag set with the use of classes: Classes use the dot notation as below: h1.breakingnews { color: #ff0000; }
  • #36: What if you wanted some h1 tags to be blue and some red? Expand the existing tag set with the use of classes: Classes use the dot notation as below: h1.breakingnews { color: #ff0000; }
  • #42: The official explanation of hexadecimal colors. I just use Photoshop or one of the color pickers in the coding programs.
  • #43: The official explanation of hexadecimal colors. I just use Photoshop or one of the color pickers in the coding programs. (When each pairing is identical, it’s a gray).
  • #46: Layout with CSS
  • #47: The basic web page layout, with a header, two columns and a footer
  • #48: The basic web page layout, with a header, two columns and a footer, using a &lt;header&gt; tag, two &lt;div&gt; tags and a &lt;footer&gt; tag.
  • #49: What’s a div tag?It’s short for “division” and it’s a way to think about creating “areas” or “segments” or “portions” of the page. Visually, these end up looking like columns or any other boxes on the page.
  • #50: What’s a div tag?It’s short for “division” and it’s a way to think about creating “areas” or “segments” or “portions” of the page. Visually, these end up looking like columns or any other boxes on the page.You may have many divs on a page, so you’ll need to give them a name, like this: &lt;div class=“promobox”&gt;
  • #51: What’s a div tag?It’s short for “division” and it’s a way to think about creating “areas” or “segments” or “portions” of the page. Visually, these end up looking like columns or any other boxes on the page.You may have many divs on a page, so you’ll need to give them a name, like this: &lt;div class=“promobox”&gt;Then, the CSS can talk directly to that div(s) for styling.
  • #52: What’s a div tag?It’s short for “division” and it’s a way to think about creating “areas” or “segments” or “portions” of the page. Visually, these end up looking like columns or any other boxes on the page.You may have many divs on a page, so you’ll need to give them a name, like this: &lt;div class=“promobox”&gt;Then, the CSS can talk directly to that div(s) for styling. .promobox { width:200px; }
  • #53: The left div gets and ID of “main_nav”
  • #54: Wait, what’s an ID?Instead of giving an element, such as a div, a class name, you can give it an ID. An ID is used once per page. A class can be used many times on a page.Assigning an ID is very similar: &lt;div id=“main_nav”&gt;Then, you can have the CSS talk directly to that div for styling. #main_nav { width:200px; /* notice the # notation */ }
  • #55: Wait, what’s an ID?In other words, an ID is a unique identifier.I use an ID on a div when I’m certain that div is going to have a unique presence on the page, such as the main navigation or the page header.
  • #56: Wait, what’s an ID?In other words, an ID is a unique identifier.I use an ID on a div when I’m certain that div is going to have a unique presence on the page, such as the main navigation or the page header.Use a class designation on a div (or other element) that may be re-used on the page, such as a typographic treatment or multiple promotional boxes that sit in the sidebar.
  • #60: Go ahead and give the header an id, as there can be many other header tags on the page.
  • #61: Go ahead and give the footer an id, as there can be many other footer tags on the page.
  • #62: The CSS for the basic layout#pageheader { margin-bottom:10px;}
  • #63: The CSS for the basic layout#pageheader { margin-bottom:10px;}#main_nav { float:left; width:200px; }
  • #64: The CSS for the basic layout#pageheader { margin-bottom:10px;}#main_nav { float:left; width:200px; }#content {margin-left: 210px;}
  • #65: The CSS for the basic layout#pageheader { margin-bottom:10px;}#main_nav { float:left; width:200px; }#content {margin-left: 210px;}#pagefooter {clear: both; margin-top:10px;}
  • #66: Example of a header box HTML and CSS with a hint of vendor prefixing for explanation. This method uses an ID of “pageheader” on the header tag for a styling hook.
  • #67: Example of a header box HTML and CSS with a hint of vendor prefixing for explanation. This method uses a descendant selector header h1. But, what if there was another header h1 scenario on the page, perhaps within a section in the content div?
  • #68: Example of a header box HTML and CSS with a hint of vendor prefixing for explanation. This method uses an adjacent sibling selector body+header, meaning this header will only style in this way if it is directly preceded by the body tag. This is a good method in that it doesn’t involve the need to use an ID or class in the HTML. Less markup.
  • #69: Example of styling an image with a large, white border and box shadow on a gray body (browser viewport).
  • #70: Example of styling an image with a large, white border and box shadow. The styling “hook” used here is a figure img. This would, of course, style all images in figure tags throughout the whole site.
  • #71: Example of styling an image with a large, white border and box shadow.
  • #72: Coda – One-window Web Development, by Panic. Sometimes I use this, but it hasn’t been updated enough in a long time.
  • #73: Textmate for code editing
  • #74: Cssedit by macrabbit. Make your edits and watch them happen in real time.
  • #75: Adobe Dreamweaver CS5.5 on Windows and Macintosh
  • #76: Microsoft Expression Web 4 on Windows
  • #77: Ultimate CSS Gradient Generator at http://www.colorzilla.com/gradient-editor/
  • #78: Progressive Internet Explorer at http://www.css3pie.com
  • #79: border-radius.com, a service by jacobbijani, at http://www.border-radius.com
  • #80: CSS3 Generator at http://www.css3generator.com
  • #81: Previewing the Deutsch | Parker Design web site in Internet Explorer 7/8/9 in Windows 7 through Parallels 6 Desktop for Mac.
  • #82: Previewing the Deutsch | Parker Design web site in Internet Explorer 7/8/9 in Windows 7 through Parallels 6 Desktop for Mac.
  • #83: Thanks to Christopher Spencer, 1987 (Photoshopped image of Christopher today with a mullet), the organizer of WordCamp Fayetteville 2010 and 2011.
  • #84: Mullet Resources
  • #85: If you are a Northwest Arkansas creative or an alumnus/alumna of the UA Art Department, please join our Facebook group!
  • #86: Done with the mullet.
  • #87: Maybe mock the ‘90s goatee next year…