Code:
.paragraph
{
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
font-style:normal;
font-variant: normal;
color: #000000;
}
This code will colour anything with class="paragraph" assigned to it.
Usually though I'd declare most of those on the body so that it formats all the document and then adjust things accordingly.
Code:
body {
font-family: arial, helvetica, sans-serif;
font-size: 85%;
color: #000;
}
You don't need to declare font-style or font-variant as normal unless you're applying it to an element that doesn't have that as default.
Now for the links. I'll usually start off by declaring a default colour for links for the entire site
Code:
a, a:link {
color: #009;
}
a:hover {
color: #C00;
}
This will set all links in your page to blue with a red hover. If you then have an instance of a link which you want to be different then you can change that accordingly, usually using an id or class on it's parent.
For example, say you have the following HTML
Code:
<div id="footer">
<p>Designed by <a href="#">Dave Woods</a></p>
</div>
You could then change the style of this link by using
Code:
#footer a, #footer a:link {
color: #000;
}
This will change anylinks inside the div with an id of footer to black but leave the hover as red.
You could also change the colour of the hover by using
Code:
#footer a:hover {
color: #00C;
}
This would change the hover in the footer to blue. Obviously you're not just limited to colours but for the purpose of this example it should demonstrate enough to get you started.
Hope that helps?
Bookmarks