Creating a style with link and hover colours help please

patrean

Registered
Hi

I'm new to Dreamweaver and coding and am having a few problems trying to create a style for a text based navigation table.

The style below creates a coloured cell with white text, what I can't figure out is how to set a link colour that won't be overwritten by the page property setting for link colour and set a hover colour with possibly underline too.

.SubMenuOn1 {
font-family: Arial, Helvetica, sans-serif;
font-size: 9pt;
color: #FFFFFF;
border: none;
background-color: #6BCDE8;

Can someone please help.

Thanks
 
Hello. I was in your same exact position. And just so it doesn't take you as long as it took me ....

You have to set it a custom "CLASS". Since your a:link & a:hover control your page's default links you have to create a NEW style rule and control any SPECIFIC links with that rule. For example; if I create a class called "myNav", then you would also have to make styles for "myNav:hover" etc. Then in your link code, you just give it that class. Example - <a href="www.myurl.com class="myNav">myTextLink</a>. Hope that helps.
 
Opps, forgot to mention that whatever class you call it, you need to out the "a." in front of it. FOR EXAMPLE; If my class is named "button", then my code will look something like this:

a.button {
color :#333333;
font-weight :normal;
font-size :14pt;
font-family :Arial, Helvetica, sans-serif;
text-decoration :none;
background-color :#CCCCCC;
height : auto;
width :100px;
border :thin solid;
border-color:#CCCCCC;
}
a.button:hover {
color :#FFFFFF;
text-decoration :none;
background-color :#999999;
border: thin outset;
border-color: #FFFFFF #000000 #000000 #FFFFFF;
cursor:default;
}
a.button:visited {
color :#FF0000;
text-decoration :none;
background-color :#999999;
border: thin outset;
border-color: #FFFFFF #000000 #000000 #FFFFFF;
}

So then when you are creating a link, just assign it a class like so;
<a href="anylink.html class="button">About Us</a>,

VWalaa!...
 
Back
Top