Skip to Main Content
Adobe® Dreamweaver® CS4 Bible
book

Adobe® Dreamweaver® CS4 Bible

by Joseph Lowery
March 2009
Beginner to intermediate content levelBeginner to intermediate
1321 pages
46h 24m
English
Wiley
Content preview from Adobe® Dreamweaver® CS4 Bible
260
Part II
Designing and Crafting Basic Pages
The formula for creating specificity is as follows:
Total inline styles, total ID selectors, total class and
pseudo-class selectors, total tag elements
Inline styles are the most specific—and the most rarely used these days—so they trump any other
type of selector. If two rules have the same specificity and are applied to the same selection, the rule
that comes later in the style sheet—because it is physically closer to the code—wins.
How styles are applied
CSS applies style formatting to your page in one of three ways:
Via an external, linked style sheet
Via an embedded style
Via inline style rules
External style sheets
An external style sheet is a file containing the CSS rules; it links one or more Web pages. One ben-
efit of linking to an external style sheet is that you can customize and change the appearance of a
Web site quickly and easily from one file.
Two different methods exist for working with an external style sheet: the
link method and the
import method. Dreamweaver initially defaults to the link method, but you can also choose
import if you prefer.
For the
link method, a line of code is added outside of the <style> tags, as follows:
<link href=”mainstyle.css” rel=”style sheet” type=”text/css”>
The import method writes code within the style tags, as follows:
<style type=”text/css”>
<!--
@import url(“newstyles.css”);
-->
</style> ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Adobe® Dreamweaver® CS5 Bible

Adobe® Dreamweaver® CS5 Bible

Joseph W. Lowery
Dreamweaver® CS3 Bible

Dreamweaver® CS3 Bible

Joseph W. Lowery

Publisher Resources

ISBN: 9780470382523Purchase book