No, you don't have to store your CSS in seperate files, it's just more convenient...
Based on the documentation at the link i posted, you would put
Quote:
<style type="text/css">
<!--
body {
margin:50px 0px; padding:0px;
text-align:center;
}
#Content {
width:500px;
margin:0px auto;
text-align:left;
padding:15px;
border:1px dashed #333;
background-color:#eee;
}
-->
</style>
|
This must be somewhere inside your <head></head>
Then, you would add the #Content to your tags like this:
Quote:
|
<div class="Content"> whatever goes here </div>
|
or
Quote:
<table class="Content">
<tr>
<td> whatever goes here </td>
</tr>
</table>
|
Now, whatever tags you put in your css under #Content will be applied to the objects you apply that class to. (tags that don't apply to the object type are ignored)
There is so much you can do with CSS.
If you store your CSS in a seperate file (ie: mystyles.css) you can just link the file to your HTML by adding:
Quote:
|
<link href="path/to/file/mystyles.css" rel="stylesheet" type="text/css" />
|
somewhere in your <head></head> tag.
You can even load multiple CSS styles if you need to. Just remeber that if you define the same class (ie: #Content) in more than one file, the last one you load will be used.
Hope this helps.
Mike.