Forum Moderators: not2easy
i am trying to change the color of two links in a div (in a div, in a div, in a div, etc). for some reason, the color of the text will not change -- every other attribute of the link (padding, border, bg color, etc) works fine. but the actual text color is using the color of the parent div, instead.
any idea what else i can change?
==========
<div class="story_button">
<a href="/counterpoint-the-conduit-doesnt-justify-the-hype/">« Back</a>
</div>
<div class="story_button">
<a href="/point-counterpoint-pros-and-conduits/">Next »</a>
</div>
==========
both of those divs appear within a much larger div, where the link color is a light blue. so, im assuming because they are within that parent div, that is why they are showing that light blue text color.
however, the link color of the two smaller divs above is SUPPOSED to be white, as seen in their CSS, below:
==========
.story_button {
border: 2px #000000 solid;
text-align: center;
margin: 2px;
}
.story_button a{
background-color: #320000;
color: #ffffff;
text-decoration: none;
font-size: 17px;
font-weight: bold;
display: block;
padding: 13px;
}
.story_button a:hover {
background-color: #e10000;
color: #ffffff;
text-decoration: none;
}
==========
(btw, if it helps, this is the page in question: [toonbarn.com...]
[edited by: WhySoSerious at 6:37 pm (utc) on Aug. 16, 2008]
Anyways - I think the problem is with this line of code:
.story_button a{
It should be:
.story_button a:link{
You don't want to use the important rule as it is only supported by more modern compliant browsers. I think IE ignores it altogether.
Try it out without the important and tell me if it works.
Anyways, That most likely means that you have it specified somewhere else in your code with a higher priority. You should check your CSS file(s).
Also - I looked into the !important feature. You can use it - but IE doesn't use it quite correctly. Basically it ignores it and uses whatever comes last. I would personally find the spot where its being defined (which is most likely before where your having to use important) and try to work it out with out the !important feature - however, if it works for you go ahead and use it.
Ryan