PDA

View Full Version : [css] how to classify links?


iAlex
06-05-2004, 02:07 PM
Hopefully this is a good place for this kind of question. I'm playing with vb3, it's gonna be deployed soon. I have made a page design to incorporate the forum and I'm having a little trouble getting the links to look right.

What I want to do is define two different types of links to be used on my code, that is the part of the page that isn't vb. Obviously these definitions should in no way affect (override) any css declared in vb. But since I'm no css specialist, I couldn't get it to work properly. I tried like this..

.classone a:link, a:hover, a:visited {
color: White;
font-weight: bold;
}

.classtwo a:link, a:hover, a:visited {
color: Black;
}

In my code, I applied it like so..

<div class="classone"><a href="#">link one</a></div>

<div class="classtwo"><a href="#">link two</a></div>

What happened here is that MY links looked the way I wanted them to. But some of the links of vb were affected by my definitions, some were made white, some were made bold etc. So I'm thinking I have to be doing something wrong. Anyone know?

sabret00the
06-05-2004, 02:56 PM
Hopefully this is a good place for this kind of question. I'm playing with vb3, it's gonna be deployed soon. I have made a page design to incorporate the forum and I'm having a little trouble getting the links to look right.

What I want to do is define two different types of links to be used on my code, that is the part of the page that isn't vb. Obviously these definitions should in no way affect (override) any css declared in vb. But since I'm no css specialist, I couldn't get it to work properly. I tried like this..

.classone a:link, a:hover, a:visited {
color: White;
font-weight: bold;
}

.classtwo a:link, a:hover, a:visited {
color: Black;
}

In my code, I applied it like so..

<div class="classone"><a href="#">link one</a></div>

<div class="classtwo"><a href="#">link two</a></div>

What happened here is that MY links looked the way I wanted them to. But some of the links of vb were affected by my definitions, some were made white, some were made bold etc. So I'm thinking I have to be doing something wrong. Anyone know?
either a.classone:link, a.classone:hover, a.classone:visited {
or
a:link.classone, a:hover.classone, a:visited.classone {
should fix it