web design class: css (cascading style sheets) fundamentals

17
WEB DESIGN CLASS: CSS FUNDAMENTALS (OR THE TIP OF THE ICEBERG) Oleg Kagan, [email protected] Photo: (cc) Uta Wollf, Rodebay (With permission) beta

Upload: lifeinoleg

Post on 27-May-2015

404 views

Category:

Education


0 download

DESCRIPTION

This "beta" deck is for a CSS (Cascading Style Sheets) Fundamentals course I first gave at the West Hollywood Library on 14 February 2014. It's still in beta, because I will very likely be refining it and the way I'm going to be teaching the class. In addition to the deck, I gave participants two handouts: 1) the HTML source for Fluffy's page, 2) the CSS Stylesheet for Fluffy's page. Fluffy is my fictional cat.

TRANSCRIPT

Page 1: Web Design Class: CSS (Cascading Style Sheets) Fundamentals

WEB DESIGN CLASS: CSS FUNDAMENTALS (OR THE TIP OF THE ICEBERG)Oleg Kagan, [email protected]

Photo: (cc) Uta Wollf, Rodebay (With permission)

beta

Page 2: Web Design Class: CSS (Cascading Style Sheets) Fundamentals

STYLE SHEETS?

Photo: (cc) Dreftymac Wikimedia Commons

Page 3: Web Design Class: CSS (Cascading Style Sheets) Fundamentals

WWW.CSSZENGARDEN.COM

Page 4: Web Design Class: CSS (Cascading Style Sheets) Fundamentals

CASCADING?

USER AGENT (browser defaults)

EXTERNAL STYLESHEET (seperate file)

INTERNAL STYLESHEET (in <head> tags)

INLINE STYLE (in other tags)

USER-DEFINED STYLE

Page 5: Web Design Class: CSS (Cascading Style Sheets) Fundamentals

WHERE WILL FLUFFY GO?

Page 6: Web Design Class: CSS (Cascading Style Sheets) Fundamentals

WHERE WILL FLUFFY GO?

Page 7: Web Design Class: CSS (Cascading Style Sheets) Fundamentals

selector {property: value;

}

RULES ARE MADE TO BE...Creative

Page 8: Web Design Class: CSS (Cascading Style Sheets) Fundamentals

body {background: #0097ff;font-family: Arial, sans-serif;color:black;

}

SEE?Selector

Property

Value

Page 9: Web Design Class: CSS (Cascading Style Sheets) Fundamentals

5 SELECTORS TO KNOW

* {

padding:0;margin:0;

}

a:link {text-decoration:none; color: #40FF00; }

a:visited {text-decoration:none; color: #40FF00; }

a:hover {text-decoration:underline; }

a:active { }

Page 10: Web Design Class: CSS (Cascading Style Sheets) Fundamentals

RULING THE HEADER!

h1 {letter-spacing:3px;font-size: 60px;margin: 10px 0px 10px 0px;width:100%;text-align:center;

}

text-transform: capitalize|uppercase|lowercase|initial|inherit;line-height: value;

Page 11: Web Design Class: CSS (Cascading Style Sheets) Fundamentals

RULING THE PARAGRAPH!

<p style="width:50%; text-align:center; margin-left:350px;"> My Paragraph</p>

INLINE STYLE (in other tags)

Page 12: Web Design Class: CSS (Cascading Style Sheets) Fundamentals

Class: Many of the same.

ID: One of a kind.

CLASSES & IDS, OH MY!

<hr class="groovy-hrs" />

Page 13: Web Design Class: CSS (Cascading Style Sheets) Fundamentals

<DIV> AND CONQUER

<div id="favorite-things">

#favorite-things {float:left;margin: 20px 20px 20px

353px;}

20px

20px

20px

353px

Page 14: Web Design Class: CSS (Cascading Style Sheets) Fundamentals

BOX MODEL

More: http://www.w3schools.com/css/css_boxmodel.asp

Page 15: Web Design Class: CSS (Cascading Style Sheets) Fundamentals

A FEW GOOD PROPERTIES...o border: 3px white solid;o list-style-type: disc|square|circle;o float: left|right|turn-yourself-around;o display: Play it! o position: Play it!o font-size: value px / em / pt / % etc;o font-style: italic|oblique|initial|inherit;o font-weight: 100-900, etc.;

Page 16: Web Design Class: CSS (Cascading Style Sheets) Fundamentals

QUESTIONS?

Page 17: Web Design Class: CSS (Cascading Style Sheets) Fundamentals

THANK YOU