dfrieber
07-25-2005, 09:27 PM
Hi guys,
Here's my situation:
I have a webpage and a corresponding stylesheet. In this webpage I have created links with classes, and other links without classes. In my stylesheet, I have defined all the links with classes, as well as the "a" tag, for all the links to which i have not given classes. Here is the coding for what i'm talking about, to make things clearer:
here's where I defined the "a" tag, for all the links I did not assign classes to:
a {
color: #ffffff;
border-bottom: dotted #666666 1px;
text-decoration: none;
}
a:hover {
color: #00ffff;
border-bottom: dotted #666666 1px;
text-decoration: none;
}
and here is an example of a link who's class is "gallery":
.gallery a {
color: #ffffff;
text-decoration: none;
}
.gallery a:hover {
color: #00ffff;
text-decoration: none;
}
So for some strange reason, ALL the links on my entire webpage follow the class where i have only defined the "a" tag. So when I write something like <a class="gallery" href="yadayada.html"> in my coding, it doesn't get the attributes from .gallery in the stylesheet, it gets the ones i've defined for all links.
This is really annoying, especially since I have a LOT of links on my website and cannot possibly have them all set to the same appearance.
I hope I don't have to set a class for every single link on my website, and there HAS to be a way i don't.
Thanks Everyone!
Here's my situation:
I have a webpage and a corresponding stylesheet. In this webpage I have created links with classes, and other links without classes. In my stylesheet, I have defined all the links with classes, as well as the "a" tag, for all the links to which i have not given classes. Here is the coding for what i'm talking about, to make things clearer:
here's where I defined the "a" tag, for all the links I did not assign classes to:
a {
color: #ffffff;
border-bottom: dotted #666666 1px;
text-decoration: none;
}
a:hover {
color: #00ffff;
border-bottom: dotted #666666 1px;
text-decoration: none;
}
and here is an example of a link who's class is "gallery":
.gallery a {
color: #ffffff;
text-decoration: none;
}
.gallery a:hover {
color: #00ffff;
text-decoration: none;
}
So for some strange reason, ALL the links on my entire webpage follow the class where i have only defined the "a" tag. So when I write something like <a class="gallery" href="yadayada.html"> in my coding, it doesn't get the attributes from .gallery in the stylesheet, it gets the ones i've defined for all links.
This is really annoying, especially since I have a LOT of links on my website and cannot possibly have them all set to the same appearance.
I hope I don't have to set a class for every single link on my website, and there HAS to be a way i don't.
Thanks Everyone!