Jump to content

IE won't pick up the a link colors


S@m
 Share

Recommended Posts

html:

<span class="captionLink">> <a href="#">Learn More</a></span>

css:

.captionLink {	font-family: arial, helvetica, sans-serif;	font-size: 12px;	font-weight: bold;	color: #ffcc66;	}	.captionLink a {	font-family: arial, helvetica, sans-serif;	font-size: 12px;	font-weight: bold;	color: #ffcc66;	}	.captionLink a:hover {	font-family: arial, helvetica, sans-serif;	font-size: 12px;	font-weight: bold;	color: #ffcc66;	text-decoration: underline;	}

FF works fine. It has an orage text with orange underline on rollover.IE keeps the default rollover colors that I set earlier in the css file.However, if I make the font a different size, both browsers pick that up. It's just the font color that IE won't see. Is there a trick to fix that?Thank you much for your time and help!!

Link to comment
Share on other sites

Well, I need the ">" to be in the same class. (color, style, weight etc)That's why I kept them all in one span class then just gave the "a" a separate class.If I should do it another way, I'm all for it. I'm somewhat of a rookie if you haven't noticed. :)Thanks for your time Dan!

Link to comment
Share on other sites

Then change your CSS to:

.captionLink {font-family: arial, helvetica, sans-serif;font-size: 12px;font-weight: bold;}.captionLink, .captionLink a { color: #ffcc66; text-decoration: none }.captionLink a:hover { color: #ffcc66; text-decoration: underline }
Remember that when you are supposed to repeat some CSS code, you should try to write it elsehow :)
Link to comment
Share on other sites

Hey thanks Dan!That didn't work, but it gave me other ideas to try and I got somthing that works. I changed the class to an "id" and changed the css a little...

#captionLink {	font-family: arial, helvetica, sans-serif;	font-size: 12px;	font-weight: bold;	color: #ffcc66;	}	#captionLink a {	color: #ffcc66;	text-decoration: none;	}#captionLink a:hover {	color: #ffcc66;	text-decoration: underline;	}

Then I just did a span id="" type thing.If that is a bad idea, let me know.Thanks for your help!!

Link to comment
Share on other sites

  • 2 weeks later...
If it works for you, it would be fine :)

(this is whats on my pages)--a:link {color: #0000ff ! important; text-decoration: none;}a:hover {color: #00ff00 ! important; text-decoration: underline;}(this is an option yo can do on yours)--A.captionLink:link { ...; color:red ! important}A.captionLink:hover { ...; color:blue ! important}by adding important into the tags it makes IE read it and it takes over anything else that might conflict the color.
Link to comment
Share on other sites

Try this one, may be it helps

.captionLink {	font-family: arial, helvetica, sans-serif;	font-size: 12px;	font-weight: bold;	color: #ffcc66;	}	.captionLink a:link {	font-family: arial, helvetica, sans-serif;	font-size: 12px;	font-weight: bold;	color: #ffcc66;	}.captionLink a:visited {	font-family: arial, helvetica, sans-serif;	font-size: 12px;	font-weight: bold;	color: #ffcc66;	}.captionLink a:hover {	font-family: arial, helvetica, sans-serif;	font-size: 12px;	font-weight: bold;	color: #ffcc66;	text-decoration: underline;	}

i have just added a:link and a:visited as the same.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...