Forum Moderators: not2easy

Message Too Old, No Replies

Possible to have two link styles on same page?

CSS in Dreamweaver issue.

         

webmstr

8:25 pm on Nov 10, 2005 (gmt 0)

10+ Year Member



I have a page that has the a:link set with a burgundy background color and cream text. In the same page I would like to be able to have the links be dark blue on a cream background. How do you get two different link properties on the same page?

DanA

9:03 pm on Nov 10, 2005 (gmt 0)

10+ Year Member



You can use a class :
CSS
a.dark_blue_on_a_cream_background:link{
/*your definitions here*/
}
HTML
<a href="#">some text</a>
<a class="dark_blue_on_a_cream_background" href="#">some text</a>

[edited by: DanA at 9:09 pm (utc) on Nov. 10, 2005]

jessejump

9:05 pm on Nov 10, 2005 (gmt 0)

10+ Year Member



The same way you can have two or ten paragraph or div styles:

p.class {styles...}

p.otherclass {}

a:link {}
a:hover etc.

a.class:psuedoclass {}

a.other:link
a.other:visited {} etc.

a.another:link

<a class=other" ......>

<a class="another" ......>

Arno_Adams

4:33 pm on Nov 11, 2005 (gmt 0)

10+ Year Member



Or use this for external links:

A[target] { color: red; }
A {color: green; }

Works in Mozilla & Opera

HTH, Tom