Instead of using in-line CSS or adding a <style> tag in the header, you can link to an external stylesheet for your styles. This allows more than one page to reference the same styles and is usually considered the best practice for most CSS.
First, create a CSS file (usually in a "css" folder). You can create a new file in dreamweaver, then just change it's file extension to ".css".
Then, in the header (between the <head> and </head> tags), add the following code:
<link rel="stylesheet" type="text/css" href="css/main.css">
Where "href" is the location of your css file.
In your CSS document, you can write CSS just like you would between the <style> and </style> tags, but you do not include the actual tags.
Important: When referring to an image in your CSS document, if you're in a "css" folder, you must "look back" one level by using the ../ before the image path.
[BACK to RESOURCES]