Cascading Style Sheets

Download Report

Transcript Cascading Style Sheets

Cascading Style Sheets
August 18, 2007
Background




CSS introduced in 1994. CSS2 introduced in
1998.
FrontPage had poor CSS support
Dreamweaver has had excellent CSS support
Purpose of CSS – to dramatically improve
formatting capabilities
Advantages of CSS over HTML









Positioning objects and text
Absolute positioning
Fixed backgrounds for web pages
Specify page layout
Better design control
Web sites are easier to maintain
Specify styles at the element or page lever
Store style info in a element, page, or external file
More margin controls (left vs right and top vs bottom)
Cascading


Cascading refers to the capability for style
information stored in more than one location
and then combined.
Three types of styles



Inline
Embedded
External – files with a .css extension
Rules of CSS




You can have multiple external style files.
Inline styles override embedded styles.
Embedded styles override external styles.
Multiple external style files are processed in
order defined on page
Misc


Expression Web will usually use embedded
styles. But you can easily move these
embedded styles to external style files.
CSS reports – Unused styles, undefined classes,
mismatched case