beginning css

43
Introduction to Cascading Style Sheets

Upload: 8ran

Post on 04-Dec-2014

1.384 views

Category:

Business


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Beginning Css

Introduction toCascading

Style Sheets

Page 2: Beginning Css

Agenda!

• Theory of CSS

• Code, code, code

• “Boxes” concept

• Editing CSS in Dreamweaver

Page 3: Beginning Css

What are some of the similarities between:

a Word Document

and

a Web Page?

Page 4: Beginning Css

Differences?

image audio

style sheet javascript

video

Page 5: Beginning Css

HTML Document CSS Document

Headings Fonts

Colors

Background images

Borders

Margins

Padding

Letter Spacing

Positioning

Alignment

Stacking Order

More, More, More!

Image or Video

Placeholders

Paragraph text that’s lovely to read…

• Bulleted

• Lists

1. Numbered

2. Lists

Page 6: Beginning Css

HTML Document CSS Document

Headings Be Blue

Be Centered

Be Aligned Right

Image or Video

Placeholders

Paragraph text that’s lovely to read…

• Bulleted

• Lists

1. Numbered

2. Lists

Page 7: Beginning Css

Example:

http://www.msu.edu

Page 8: Beginning Css

CSS Showcase Examples

CSS Zen Garden

Page 9: Beginning Css

How does it work?

Page 10: Beginning Css

Changing Properties of an HTML Element

<p>Paragraph text.</p>

HTML document says:

Page 11: Beginning Css

Changing Properties of an HTML Element

p { color: red; }

“selector” “property” “value”

CSS document says:

Page 12: Beginning Css

The Result:

Paragraph text.

Page 13: Beginning Css

Creating your own “class”

.myClass { color: green; }

“selector” “property” “value”

CSS document says:

Page 14: Beginning Css

<p class=“myClass”>

Paragraph text.

</p>

HTML document says:

Creating your own “class”

Page 15: Beginning Css

The Result:

Paragraph text.

Page 16: Beginning Css

What if we combine what we have so far?

.myClass { color: green; }

p { color: red; }CSS

HTML<p class=“myClass”>Paragraph text.</p>

<p>Paragraph text.</p>

Page 17: Beginning Css

The Result

Paragraph text.

Paragraph text.

Page 18: Beginning Css

Other Examples

<table class=“myClass”>

<img class=“myClass”>

<object class=“myClass”>

HTML document says:

Page 19: Beginning Css

Remember, we can control a LOT with CSS!

• Background images & colors

• Letter spacing

• Margins and padding

• Borders

• Lists

• Positioning

Page 20: Beginning Css

Maintenance example

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

TitleTitle

Some random Some random text here. You text here. You can’t read it can’t read it anyway! Har anyway! Har har har! Use har har! Use Css.Css.

CSSCSS

Page 21: Beginning Css

“Boxes”

block level element(div, paragraph, heading)

content area

margin

border

padding

Page 22: Beginning Css

Box Example

block level element(div, paragraph, heading)

block level element(div, paragraph, heading)block level element(div, paragraph, heading)

Page 23: Beginning Css

Dreamweaver Examples & Workflow

Page 24: Beginning Css
Page 25: Beginning Css
Page 26: Beginning Css
Page 27: Beginning Css
Page 28: Beginning Css
Page 29: Beginning Css
Page 30: Beginning Css
Page 31: Beginning Css
Page 32: Beginning Css
Page 33: Beginning Css
Page 34: Beginning Css

Main Container

Page 35: Beginning Css

Sidebar Container

Page 36: Beginning Css

Main Content

Container

Page 37: Beginning Css

HTML Document CSS Document

<div id=“mainContainer”>

</div>

#mainContainer {

width: 780px;

margin: 0 auto;

}

Page 38: Beginning Css

Width = 780px

Page 39: Beginning Css

HTML Document CSS Document

<div id=“sidebar”>

</div>

#sidebar {

float:left;

width:200px;

}

Page 40: Beginning Css

Width = 200px

Page 41: Beginning Css

HTML Document CSS Document

<div id=“mainContent”>

</div>

#mainContent {

margin: 0 0 0 250px;

}

0

00250

Page 42: Beginning Css

Width automatically

fills theremaining

space

Margin of 250pixels on the

left side

Page 43: Beginning Css

Increase the“width” property

Increase theleft “margin”