Hey there,
I was wondering if there is a way to create links in 2 different colors on a page. For example I want yellow links in the menu bar because it is a dark background and blue links on the pages. I use Dreamweaver and have a template layout. I tried making two different css styles but it didn't work, only the yellow worked and now all links in the whole site are yellow and hard to see. Any help is greatly appreciated. Thanks!!!!We can't really help a whole lot unless you give us some more info (i.e. your HTML and CSS source). The easiest way is to create CSS classes:
/* General link colors */
a:link {
color: #[Hex color value];
}
a:visited {
color: #[Hex color value];
}
a:hover {
color: #[Hex color value];
}
a:focus {
color: #[Hex color value];
}
a:active {
color: #[Hex color value];
}
/* Menu link colors */
.menu:link {
color: #[Hex color value];
}
.menu:visited {
color: #[Hex color value];
}
.menu:hover {
color: #[Hex color value];
}
.menu:focus {
color: #[Hex color value];
}
.menu:active {
color: #[Hex color value];
}
Then to give the menu links the correct color:
<a href=http://www.webdeveloper.com/forum/archive/index.php/"#" class="menu"></a>
A breeze-thru at W3Schools (<!-- m --><a class="postlink" href="http://www.w3schools.com/css/">http://www.w3schools.com/css/</a><!-- m -->) also wouldn't hurt.
I was wondering if there is a way to create links in 2 different colors on a page. For example I want yellow links in the menu bar because it is a dark background and blue links on the pages. I use Dreamweaver and have a template layout. I tried making two different css styles but it didn't work, only the yellow worked and now all links in the whole site are yellow and hard to see. Any help is greatly appreciated. Thanks!!!!We can't really help a whole lot unless you give us some more info (i.e. your HTML and CSS source). The easiest way is to create CSS classes:
/* General link colors */
a:link {
color: #[Hex color value];
}
a:visited {
color: #[Hex color value];
}
a:hover {
color: #[Hex color value];
}
a:focus {
color: #[Hex color value];
}
a:active {
color: #[Hex color value];
}
/* Menu link colors */
.menu:link {
color: #[Hex color value];
}
.menu:visited {
color: #[Hex color value];
}
.menu:hover {
color: #[Hex color value];
}
.menu:focus {
color: #[Hex color value];
}
.menu:active {
color: #[Hex color value];
}
Then to give the menu links the correct color:
<a href=http://www.webdeveloper.com/forum/archive/index.php/"#" class="menu"></a>
A breeze-thru at W3Schools (<!-- m --><a class="postlink" href="http://www.w3schools.com/css/">http://www.w3schools.com/css/</a><!-- m -->) also wouldn't hurt.