Using classes in CSS

liunx

Guest
I need to know how to make classes for the CSS on my page in reagrds to the links. On the menu of my page I want the following CSS to apply to the links:

<STYLE type="text/css">
A { color:#000000; text-decoration:none; }
A:visited { color:#000000; text-decoration:none }
A:hover { color:#FFFFFF; text-decoration:none; }
A:active { color:#000000; text-decoration:none}
</STYLE>

However, within the content area of my page, I want the following CSS to apply to the links within the content area only and not affect the menu links:

<style type="text/css"><!--
A { color:#1e1e1e; text-decoration:underline; }
A:visited { color:#1e1e1e; text-decoration:underline }
A:hover { color:#FFFFFF; text-decoration:none; }
A:active { color:#1e1e1e; text-decoration:underline}
--></STYLE>

I know there is a way to do this with the use of classes but I dont know the code or naything for this sort of thing.

Thanks,
Davei would do this using id's ie.
<head>
<style type="text/css">
#content a{color:#1e1e1e; text-decoration:underline;}
#content a:visited{color:#1e1e1e; text-decoration:underline;}
etc.
</style>
</head>

<body>
<div id="content">
<a href=http://www.webdeveloper.com/forum/archive/index.php/"blah">Blah</a>
</div>
</body>

this way, those styles only apply to <a>'s within contentYeah, I'd go with what samij suggested. It's easier than assigning multiple links a class. Saves on typing and such. ;)
 
Back
Top