S@m Posted November 23, 2005 Share Posted November 23, 2005 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 More sharing options...
Jack McKalling Posted November 23, 2005 Share Posted November 23, 2005 I don't know if it helps, but why don't you apply the class to the anchor? [CSS]A.captionLink:link { ...; color:red }A.captionLink:hover { ...; color:blue }[/CSS]<a class="captionLink" href="#">Learn More</a> Link to comment Share on other sites More sharing options...
S@m Posted November 23, 2005 Author Share Posted November 23, 2005 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 More sharing options...
Jack McKalling Posted November 23, 2005 Share Posted November 23, 2005 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 More sharing options...
S@m Posted November 23, 2005 Author Share Posted November 23, 2005 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 More sharing options...
Jack McKalling Posted November 23, 2005 Share Posted November 23, 2005 If it works for you, it would be fine Link to comment Share on other sites More sharing options...
Patriot Posted December 3, 2005 Share Posted December 3, 2005 If it works for you, it would be fine <{POST_SNAPBACK}> (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 More sharing options...
mani_ Posted December 3, 2005 Share Posted December 3, 2005 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now