Click to See Complete Forum and Search --> : Two different link colors on one page


SJKate
08-22-2006, 02:21 PM
Hey there all,

OK, I know this is possible!!

I am using DW to design my site. I have the link colors defined in page properties, which I believe puts them in CSS style like so:
a:link {
color: #663399;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #CC3399;
}
a:hover {
text-decoration: none;
color: #000066;
}
a:active {
text-decoration: none;
color: #3333FF;

I have used div layers on this page, and was wondering if it is possible to override these page properties in one of my layers and change the link colors for just that div layer.

If so, what is the formatting for that?

Should I erase the link styles from the page properties?

Help pls!!

Wiz Creations
08-23-2006, 12:49 AM
Your css will depend on what the links are contained in. If no container (i.e. div, span, p, etc), see option 2.

OPTION 1 - container
link type one is in a <div> and type two is in a <p> tag.div a:link {
styles
}
div a:visited {
styles
}
etc

p a:link {
styles
}
p a:visited {
styles
}
etc
OPTION 2 - classes
make two classes: one for each color settings. we can name them "reds" and "blues" for this example..reds a:link {
styles
}
.reds a:visited {
styles
}
etc

.blues a:link {
styles
}
.blues a:visited {
styles
}
etcIn the links you want to have the reds color, add class="reds" to the <a> tag and for blues, add class="blues"

worst hacker
08-23-2006, 05:56 AM
hi

i think this person who reply is right,becouse i could give you the second choice according to what you wrote there. :(

SJKate
08-23-2006, 12:01 PM
Thank you- I figured it was something that should have an easy answer. I named a css style and used that style for the layer that the links were on.

I know, I know, people hate layers, but screw it cause they are easy to use! :o