Transcript
Page 1: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

Website Design 1 Professor Danne Woowebdesign.dannewoo.com

ΑRTS 214 – 02Spring 2016Thursday 2:00 pm – 5:50 pm I-Building 213

Page 2: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

HTML Review

Basic Structure and Elements

- Text- Lists- Links

- Images

- Tables- Extra Markups

Page 3: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

HTML Review

Page 4: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

HTML Review

OPENING TAG CLOSING TAG

CHARACTER CHARACTER

LEFT-ANGLE BRACKET RIGHT-ANGLE BRACKET

FORWARD SLASH

Page 5: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

HTML Review

<html><head><title>This is the Title of...</title></head><body><h1>This is the Body of the Page</h1><p>Anything within the body of a web

page is displayed in the main browser window.</p>

</body></html>

Page 6: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

HTML Review

Text HTML

<h1>This is a Main Heading</h1><p>A paragraph <br/>consists of one or more sentences that form a self-contained <i>unit</i> of discourse. The start of a <b>paragraph</b> is indicated by a new line.</p>

Page 7: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

HTML Review

Text

Page 8: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

HTML

<ul><li>Cat</li><li>Dog</li>

<ol><li>Golden Retriever</li><li>Labrador</li><li>Daschund</li>

</ol><li>Rabbit</li>

</ul>

HTML Review

Lists

Page 9: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

HTML Review

Lists

Page 10: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

HTML

<a href="http://www.google.com" target="_blank">Go to Google</a> <a href="mailto:[email protected]">Email Jon</a>

HTML Review

Links

Page 11: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

HTML Review

Links

Page 12: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

HTML Review

Links

Page 13: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

HTML Review

Links

Page 14: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

HTML Review

Links

Page 15: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

exampleartsindex.htmlmovies

cinemaindex.htmllistings.htmlreviews.html

dvdindex.htmllistings.htmlreviews.html

musicindex.htmllistings.htmlreviews.html

theaterindex.htmllistings.htmlreviews.html

Relative URLs

HTML Review

Page 16: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

exampleartsindex.htmlmovies

cinemaindex.htmllistings.htmlreviews.html

dvdindex.htmllistings.htmlreviews.html

musicindex.htmllistings.htmlreviews.html

theaterindex.htmllistings.htmlreviews.html

SAME

HTML Review

Page 17: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

exampleartsindex.htmlmovies

cinemaindex.htmllistings.htmlreviews.html

dvdindex.htmllistings.htmlreviews.html

musicindex.htmllistings.htmlreviews.html

theaterindex.htmllistings.htmlreviews.html

SAMEreviews.html

HTML Review

Page 18: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

exampleartsindex.htmlmovies

cinemaindex.htmllistings.htmlreviews.html

dvdindex.htmllistings.htmlreviews.html

musicindex.htmllistings.htmlreviews.html

theaterindex.htmllistings.htmlreviews.html

CHILD

HTML Review

Page 19: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

exampleartsindex.htmlmovies

cinemaindex.htmllistings.htmlreviews.html

dvdindex.htmllistings.htmlreviews.html

musicindex.htmllistings.htmlreviews.html

theaterindex.htmllistings.htmlreviews.html

CHILDmusic/index.html

HTML Review

Page 20: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

exampleartsindex.htmlmovies

cinemaindex.htmllistings.htmlreviews.html

dvdindex.htmllistings.htmlreviews.html

musicindex.htmllistings.htmlreviews.html

theaterindex.htmllistings.htmlreviews.html

GRANDCHILD

HTML Review

Page 21: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

exampleartsindex.htmlmovies

cinemaindex.htmllistings.htmlreviews.html

dvdindex.htmllistings.htmlreviews.html

musicindex.htmllistings.htmlreviews.html

theaterindex.htmllistings.htmlreviews.html

GRANDCHILDmovies/dvd/index.html

HTML Review

Page 22: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

exampleartsindex.htmlmovies

cinemaindex.htmllistings.htmlreviews.html

dvdindex.htmllistings.htmlreviews.html

musicindex.htmllistings.htmlreviews.html

theaterindex.htmllistings.htmlreviews.html

GRANDPARENT

HTML Review

Page 23: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

exampleartsindex.htmlmovies

cinemaindex.htmllistings.htmlreviews.html

dvdindex.htmllistings.htmlreviews.html

musicindex.htmllistings.htmlreviews.html

theaterindex.htmllistings.htmlreviews.html

GRANDPARENT../../index.html

HTML Review

Page 24: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

HTML

<p><img src="images/bird.gif" alt="bird"width="100" height="100" align="left" />There are around 10,000 living species of birds that inhabit different ecosystems from the Arctic to the Antarctic. Man species undertake long distance annual migrations, and many more perform shorter irregular journeys.</p>

HTML Review

Images

Page 25: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

HTML Review

Images

Page 26: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

HTML

<table><tr>

<th scope="col">Header 1</th><th scope="col" colspan="2">Header 2</th>

</tr><tr>

<td>20</td><td>74</td><td>80</td>

</tr></table>

HTML Review

Tables

Page 27: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

HTML Review

Tables

Page 28: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

HTML

<!-- This is the header container --><div id="header">

<h1 class="head">My Website</h1><a href="index.html">Home</a><a href="bio.html">Bio</a><a href="works.html">Works</a><a href="contact.html">Contact</a><p>Welcome to my <span class="highlight">website</span></p>

</div>

HTML Review

Extra Markups

Page 29: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

HTML Review

Extra Markups

Page 30: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

HTML

<iframe width="450" height="350"src="http://maps.google.co.uk/maps?

q=moma+new+york&amp;output=embed"frameborder="0"scrolling="no">

</iframe>

HTML Review

Extra Markups

Page 31: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

HTML Review

Extra Markups

Page 32: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

What is CSS used for?

Presentation

StyleLayout

Page 33: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS: Introduction

The Cottage Garden

The cottage garden is a distinct style of garden that uses an informal design, dense planting and a mixture of ornamental and edible plants.

The Cottage Garden originated in England and its history can be traced back for centuries, although they were re-invented in 1870's England, when stylized versions were formed as a reaction to the more structured and rigorously maintained English estate gardens.

The earliest cottage gardens were more practical than their modern descendants, with an emphasis on vegetables and herbs, along with some fruit trees.

Understanding CSS: Thinking Inside the Box

Page 34: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS: Introduction

CSS Attaches Style Rules to HTML Elements

p {font-family: Arial;

}

Page 35: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS: Introduction

CSS Attaches Style Rules to HTML Elements

p {font-family: Arial;

}

SELECTOR

Page 36: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS: Introduction

CSS Attaches Style Rules to HTML Elements

p {font-family: Arial;

}

SELECTOR

DECLARATION

Page 37: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS: Introduction

CSS Attaches Style Rules to HTML Elements

h1, h2, h3 {font-family: Arial;color: yellow;

}

Page 38: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS: Introduction

CSS Attaches Style Rules to HTML Elements

h1, h2, h3 {font-family: Arial;color: yellow;

}PROPERTY

Page 39: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS: Introduction

CSS Attaches Style Rules to HTML Elements

h1, h2, h3 {font-family: Arial;color: yellow;

}PROPERTY VALUE

Page 40: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

HTML

<h1>From Garden to Plate</h1><p>A <i>potager</i> is a French term for

an ornamental vegetable or kitchengarden...</p>

<h2>What to Plant</h2><p>Plants are chosen as much for their

functionality as for their color andform...</p>

CSS: Introduction

Introducing CSS to HTML Elements

Page 41: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

CSS: Introduction

Introducing CSS to HTML Elements

Page 42: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS

body {font-family: Arial, Verdana, sans-serif;}

h1, h2 {color: #ee3e80;}

p {color: #665544;}

CSS: Introduction

Introducing CSS to HTML Elements

Page 43: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

CSS: Introduction

Introducing CSS to HTML Elements

Page 44: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS: Introduction

Three Ways to Use CSS

- Inline CSS- Internal CSS- External CSS

Page 45: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

HTML & CSS

<html><head><title>Using Inline CSS</title>

</head><body style="font-family:arial;background-color:rgb(185,179,175);"><h1>Potatoes</h1><p style="color:rgb(255,255,255);">There are dozens of...</p><p>No inline CSS here</p>

</body></html>

CSS: Introduction

Inline CSS

Page 46: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

CSS: Introduction

Inline CSS

Page 47: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

HTML & CSS

<html><head><title>Using Internal CSS</title><style type="text/css">body { font-family: arial;background-color: rgb(185,179,175); }

p { color: rgb(255,255,255); }</style></head><body><h1>Potatoes</h1><p>There are dozens of...</p><p>No inline CSS here</p>

</body></html>

CSS: Introduction

Internal CSS

Page 48: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

CSS: Introduction

Internal CSS

Page 49: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

HTML

<html><head><title>Using External CSS</title><link href="css/styles.css"

type="text/css” rel="stylesheet"></head><body><h1>Potatoes</h1><p>There are dozens of...</p><p>No inline CSS here</p>

</body></html>

CSS: Introduction

External CSS

Page 50: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS

body { font-family: arial;background-color: rgb(185,179,175);

}

p {color: rgb(255,255,255);

}

CSS: Introduction

External CSS

Page 51: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

CSS: Introduction

External CSS

Page 52: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS: Introduction

CSS Selectors

Universal * {}

Type h1, h2, h3 {}

Class .note {}p.note {}

ID #introduction {}

Page 53: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS: Introduction

CSS Selectors

Child li>a {}

Descendent p a {}

Adjacent sibling h1+p {}

General sibling h1~p {}

Page 54: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS

* {font-family: Arial;color: #333333;}

h1 {font-family: "Courier New";}

i {color: green;}i {color: red;}

p b {color: blue !important;}p b {color: violet;}

CSS: Introduction

How CSS Rules Cascade

Page 55: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

CSS: Introduction

How CSS Rules Cascade

Page 56: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS

body {font-family: Arial, sans-serif;color: #665544;padding: 10px;}

.page {border: 1px solid #665544;background-color: #efefef;padding: inherit;}

CSS: Introduction

Inheritance

Page 57: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

CSS: Introduction

Inheritance

Page 58: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS: Introduction

Why Use External Style Sheets

- Same CSS file can be used for every page.- No need to copy style code into each page.- Changes to CSS automatically apply to the

entire website.- Fast download time for subsequent pages.

Page 59: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS: Introduction

Page 60: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS: Introduction

CSS Styling

- Color- Type- Boxes

- Lists, Tables and Forms

- Layout- Images

Page 61: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS

h1 {color: DarkCyan;

}

h2 {color: #ee4e80;

}

p {color: rgb(100, 100, 90);

}

CSS: Color

Foreground Color

Page 62: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

CSS: Color

Foreground Color

Page 63: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS

body {background-color: rgb(200,200,200);}

h1 {background-color: DarkCyan;}

h2 {background-color: #ee3e80;}

p {background-color: white;}

CSS: Color

Background Color

Page 64: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

CSS: Color

Background Color

Page 65: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS

p.one {background-color: rgb(0,0,0);opacity: 0.5;padding: 10px;

}

p.two {background-color: rgb(0,0,0);background-color: rgba(0,0,0,0.5);

}

CSS: Color

Opacity (CSS3)

Page 66: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

CSS: Color

Opacity (CSS3)

Page 67: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS

body {background-color: hsl(0,0.0%, 78%);

}h1 {

background-color: hsl(0,100%,50%);}p {

background-color: hsla(200,100%,50%,0.5);}

CSS: Color

HSL and HSLA (CSS3)

Page 68: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

CSS: Color

HSL and HSLA (CSS3)

Page 69: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS

body {font-family: Georgia, Times, serif;}

h1, h2 {font-family: Arial, Verdana, sans-serif;}

.credits {font-family: Courier, monospace;}

CSS: Type

Font Family

Page 70: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

CSS: Type

Font Family

Page 71: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS

body {font-family: Arial, Verdana, sans-serif;font-size: 12px;}

h1 {font-size: 200%;}

.credits {font-size: 1.3em;}

CSS: Type

Font Size

Page 72: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

CSS: Type

Font Size

Page 73: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS: Type

Type Scales

- Developed in the 16th Century.- Pleasing to the eye.- Reason its used in all software

programs.

Page 74: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS

@font-face {font-family: 'ChunkFiveRegular';src: url('fonts/chunkfive.ttf');}

h1, h2 {font-family: ChunkFiveRegular, Georgia,

serif;}

CSS: Type

More Font Choices

Page 75: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

CSS: Type

More Font Choices

Page 76: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS: Type

Font Face File Types

Page 77: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS

@font-face {font-family: 'ChunkFiveRegular';src: url('fonts/chunkfive.eot');src: url('fonts/chunkfive.eot?#iefix')

format('embedded-opentype'),url('fonts/chunkfive.woff')format('woff'),url('fonts/chunkfive.ttf')format('truetype'),url('fonts/

chunkfive.svg#ChunkFiveRegular')format('svg');}

CSS: Type

Font Face Fix

Page 78: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS

CSS: Type

Google Fonts

Page 79: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS

.credits {font-weight: bold;

}

CSS: Type

Bold

Page 80: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

CSS: Type

Bold

Page 81: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS

.credits {font-style: italic;

}

CSS: Type

Italic

Page 82: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

CSS: Type

Italic

Page 83: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS

.credits {text-decoration: underline;

}

a {text-decoration: none;

}

CSS: Type

Underline or Strike

Page 84: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

CSS: Type

Underline or Strike

Page 85: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS

p {line-height: 1.4em;

}

CSS: Type

Leading

Page 86: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

CSS: Type

Leading

Page 87: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS

h1, h2 {text-transform: uppercase;letter-spacing: 0.2em;

}

.credits {font-weight: bold;word-spacing: 1em;

}

CSS: Type

Letter or Word Spacing

Page 88: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

CSS: Type

Letter or Word Spacing

Page 89: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS

#six-months {vertical-align: text-top;

}

#one-year {vertical-align: baseline;

}

#two-years {vertical-align: text-bottom;

}

CSS: Type

Vertical Alignment

Page 90: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

CSS: Type

Vertical Alignment

Page 91: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS

h1 {background-image: url("images/logo.gif");background-repeat: no-repeat;text-indent: -9999px;

}

.credits {text-indent: 20px;

}

CSS: Type

Indenting Text

Page 92: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

CSS: Type

Indenting Text

Page 93: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS

p.one {background-color: #eeeeee;color: #666666;text-shadow: 1px 1px 0px #000000;}

p.two {background-color: #dddddd;color: #666666;text-shadow: 1px 1px 3px #666666;}

p.three {background-color: #cccccc;color: #ffffff;text-shadow: 2px 2px 7px #111111;}

CSS: Type

Text Drop Shadow (CSS3)

Page 94: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

CSS: Type

Text Drop Shadow (CSS3)

Page 95: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS

p.intro:first-letter {font-size: 200%;

}

p.intro:first-line {font-weight: bold;

}

CSS: Type

First Letter of Line

Page 96: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

CSS: Type

First Letter of Line

Page 97: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS

a:link {color: deeppink;text-decoration: none;}

a:visited {color: black;}

a:hover {color: deeppink;text-decoration: underline;}

a:active {color: darkcyan;}

CSS: Type

Styling Links

Page 98: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

CSS: Type

Styling Links

Page 99: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS

div {height: 300px;width: 400px;background-color: #ee3e80;}

p {height: 75%;width: 75%;background-color: #e1ddda;}

CSS: Boxes

Box Dimensions

Page 100: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

CSS: Boxes

Box Dimensions

Page 101: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS

td.description {min-width: 450px;max-width: 650px;text-align: left;padding: 5px;margin: 0px;}

CSS: Boxes

Limiting Width

Page 102: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

CSS: Boxes

Limiting Width

Page 103: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS

h2, p {width: 400px;font-size: 90%;line-height: 1.2em;}

h2 {color: #0088dd;border-bottom: 1px solid #0088dd;}

p {min-height: 10px; max-height: 30px;}

CSS: Boxes

Limiting Height

Page 104: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

CSS: Boxes

Limiting Height

Page 105: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS

p.one {overflow: hidden;

}

p.two {overflow: scroll;

}

CSS: Boxes

Overflowing Content

Page 106: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

CSS: Boxes

Overflowing Content

Page 107: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS: Boxes

Border, Margin and Padding

MARGINBORDER PADDING

Page 108: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS

p.one {border-width: 2px;

}

p.two {border-width: thick;

}

p.three {border-width: 1px 4px 12px 4px;

}

CSS: Boxes

Border Width

Page 109: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

CSS: Boxes

Border Width

Page 110: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS

p.one {border-style: solid;}p.two {border-style: dotted;}p.three {border-style: dashed;}p.four {border-style: double;}p.five {border-style: groove;}p.six {border-style: ridge;}p.seven {border-style: inset;}p.eight {border-style: outset;}

CSS: Boxes

Border Style

Page 111: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

CSS: Boxes

Border Style

Page 112: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS

p.one {border-color: #0088dd;

}

p.two {border-color: #bbbbaa #111111 #ee3e80#0088dd;

}

CSS: Boxes

Border Color

Page 113: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

CSS: Boxes

Border Color

Page 114: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS

p {width: 250px;border: 3px dotted #0088dd;

}

CSS: Boxes

Border Shorthand

Page 115: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

CSS: Boxes

Border Shorthand

Page 116: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS

p {width: 275px;border: 2px solid #0088dd;

}

p.example {padding: 10px;

}

CSS: Boxes

Padding

Page 117: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

CSS: Boxes

Padding

Page 118: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS

p {width: 200px;border: 2px solid #0088dd;padding: 10px;

}

p.example {margin: 20px;

}

CSS: Boxes

Margin

Page 119: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

CSS: Boxes

Margin

Page 120: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS

body {text-align: center;

}p {

width: 300px;padding: 50px;border: 20px solid #0088dd;

}p.example {

margin: 10px auto 10px auto;text-align: left;

}

CSS: Boxes

Centering Content

Page 121: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

CSS: Boxes

Centering Content

Page 122: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS

li {display: inline;margin-right: 10px;

}

li.coming-soon {display: none;

}

CSS: Boxes

Change Inline / Block

Page 123: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

CSS: Boxes

Change Inline / Block

Page 124: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS

li {display: inline;margin-right: 10px;

}

li.coming-soon {visibility: hidden;

}

CSS: Boxes

Hiding Boxes

Page 125: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

CSS: Boxes

Hiding Boxes

Page 126: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS

p.one {-moz-border-image: url("dots.gif")

11 11 11 11 stretch;-webkit-border-image: url("dots.gif")

11 11 11 11 stretch;border-image: url("dots.gif")

11 11 11 11 stretch;}

p.two {border-image: url("images/dots.gif")

11 11 11 11 round;}

CSS: Boxes

Border Images (CSS3)

Page 127: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

CSS: Boxes

Border Images (CSS3)

Page 128: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS

p.one {-moz-box-shadow: -5px -5px #777777;-webkit-box-shadow: -5px -5px #777777;box-shadow: -5px -5px #777777;}

p.two {box-shadow: 5px 5px 5px #777777;}

p.three {box-shadow: 5px 5px 5px 5px #777777;}

p.four {box-shadow: 0 0 10px #777777;}

p.five {box-shadow: inset 0 0 10px #777777;}

CSS: Boxes

Box Shadows (CSS3)

Page 129: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

CSS: Boxes

Box Shadows (CSS3)

Page 130: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS

p {border: 5px solid #ee3e80;padding: 20px;width: 275px;-moz-border-radius: 10px;-webkit-border-radius: 10px;border-radius: 10px;

}

CSS: Boxes

Rounded Corners (CSS3)

Page 131: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

CSS: Boxes

Rounded Corners (CSS3)

Page 132: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

CSS

p.one {border-radius-top-left: 80px 50px;}

p.two {border-radius: 1em 4em 1em 4em /

2em 1em 2em 1em;}

p.three {padding: 0px;border-radius: 100px;}

CSS: Boxes

Elliptical Shapes (CSS3)

Page 133: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

RESULT

CSS: Boxes

Elliptical Shapes (CSS3)

Page 134: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

In Class Assignment

Try to incorporate what we discussed today into the HTML documents you created in class last week.

- Color- Type- Boxes

Page 135: Website Design 1webdesign.dannewoo.com/lectures/webdesign_week09.pdf · CSS: Introduction The Cottage Garden The cottage gardenis a distinct style of garden that uses an informal

Homework

Read chapters 14-17 in the text book.