include "_i/1.h" ?>
A stylesheet is just a text file containing CSS style declarations. The standard convention is to give stylesheets the .css extension.
Somewhere in the <head> section of your page,
create this <link ... /> :
<head> <title>How to link stylesheets</title> <link rel="stylesheet" href="mystyle.css" type="text/css" /> </head>
The href attribute obeys all the conventions about absolute and relative URLs that the <a
href="..."> does.
The 'stylesheet' at mystyle.css is a text file which contains just style rules (no comments are necessary to hide it from older browsers.), for example:
body { background-color: #bbbbbb; font-family: Geneva, Arial, Helvetica, sans-serif; } /* Here's how to make a comment in a style file */
Google "@import CSS" for another way of linking to external stylesheets, that only newer browsers support.
When you create a new style, DW will ask if you want to create it in an external stylesheet.
You can "File | Open" your stylesheet (.css file) and edit it as you would with a text editor.
<head> <title>Style Example</title> <style type="text/css"> <!-- p,ul { font-size: 1.5em; line-height: 2.3em; } --> </style> </head>
Local styles let you apply CSS rules at just one place in one page.
This is usually a bad idea:
Before you use a local style for anything but first-time experimenting,
you should ask yourself first:
<p style="text-indent: 2em; color: red;">This paragraph should have the first line indented, and all the text should be red.</p>Or to apply the same styles to more than one tag, try:
<div style="margin-left: 5em"> <p> A division "tabbed" over to the right...</p> <ul> <li>Will affect <b>all</b> the tags within the division,</li> <li>More...</li> </ul> </div>A division is always a square box. If you want to affect just some text, you can use the <span> tag instead.:
<p>I'd like <span style="color: green">just some of this text to be green</span>, not all of it.</p>