|
CASCADING STYLE SHEETS
(First, make sure that the CSS options are checked. Click
Tools | Page
Options |Authoring tab.) A
cascading style sheet is an external style sheet in a separate file (extension
.css). It specifies the style defaults for any webpage that refers to
it. A single change specifying font type, for example, can be made in the css
file, and multiple pages—all pages linked to it—are automatically changed.
CREATING CASCADING STYLE SHEETS
-
File | New.
-
In the
New task
pane, under New page, click More page templates.
-
On the
Style Sheets
tab, click the type of CSS you want to create.
-
Type the code for the
style you want OR copy from an existing style sheet.
-
Name the file “main”
and put it in a folder named “scripts.”
-
On each page that you
want to follow the styles in the css file, follow one of these options
to link to the file:
Linking Option 1 – In Design
View
-
In Design view, click Format | Style Sheet Links | Add.
-
On the Format menu, click Style Sheet Links, and then click Add.
-
Locate the .css file and click OK.
-
Do one of the following:
-
To link the
external CSS to only the current page, click Selected page(s).
-
To link the
external CSS to all pages in the current Web site, click All
Pages.
OR
Linking Option 2 – In Code View
-
On each page that you
want to follow the styles in the css file, link to it in the head
section (before the tag </head>) by typing the code for the link (or
copying and pasting).
Example:
<link rel="stylesheet"
href="scripts/main.css"> </head>
Back to Styles
Page Changed
02/21/2006
Home |