Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
CSS Code Looks Different in Firefox/Opera...
Old 01-31-2007, 05:55 PM CSS Code Looks Different in Firefox/Opera...
Skilled Talker

Posts: 50
Trades: 0
Hello-

I've been using CSS codes and they don't show up the same in Firefox and Opera. They're fine in Internet Explorer. First, I changed the color and hover color of my links. There are sidebar links (white & no underline, gray & no underline when hovered) and regular links (blue & no underline, black and underlined when hovered). Here is the code I'm using:

Code:
a.side { text-decoration: none; color: #FFFFFF; font-weight: bold; line-height: 1.3; }
a.side:hover { text-decoration: none; color="#999999"; font-weight: bold; }
a { text-decoration: none; color="#000099"; font-weight: bold; }
a:hover { text-decoration: underline; color="#000000"; font-weight: bold; }
The weird thing is that the side links turn white but have no hover effect and the regular links have the hover effect but don't change colors at all.

The other tag that is not working is the line-height.

Code:
p { line-height: 1.3; }
... is the code I'm using. Again, this works in Internet Explorer but no other browsers. I want these effects (mostly the links) but I didn't know they were browser-specific.

Thanks in Advance,
~anwipr
anwipr is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-31-2007, 09:12 PM Re: CSS Code Looks Different in Firefox/Opera...
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
You have line-height set to 1.3 -- 1.3 WHAT ??? You have to specify a measurement - em, px or percent.

I need to see the rest of your css and html to figure out what's going on with the links. One thing you must remember, if you're going to use pseudo classes, then you MUST specify them in order: Link, Visited, Hover, Active - just remember LoVeHAte
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 02-01-2007, 05:40 PM Re: CSS Code Looks Different in Firefox/Opera...
Skilled Talker

Posts: 50
Trades: 0
Here is the section of my CSS code containing links.
HTML Code:
a:link { 
 text-decoration: none; 
 color="#000099"; 
 font-weight: bold; }
 
a:visited { 
 text-decoration: none; 
 color="#000099"; 
 font-weight: bold; } 
 
a:hover { 
 text-decoration: underline; 
 color="#000000"; 
 font-weight: bold; } 
 
a.side:link { 
 text-decoration: underline; 
 color="#FFFFFF"; 
 font-weight: bold; }
 
a.side:visited { 
 text-decoration: underline; 
 color="#FFFFFF"; 
 font-weight: bold; }
 
a.side:hover { 
 text-decoration: underline; 
 color="#000099"; 
 font-weight: bold; }
 
The codes for links I am using on pages linked to the stylesheet above look like this:
HTML Code:
<a href="site.php">Click here</a>
 
<a href="site.php" class="side">Click Here</a>
Is there anything wrong with these codes? These are the updated ones based on what you said and they still look fine in IE but cause even more problems in FF. Any suggestions?

Thanks!
~anwipr

(By the way, adding the units to line-height works. I'm not sure what "em" stands for, but it works! Adding some sort of units definately seems sensible, when I first read about the line-height tag, it said units weren't necessary; I guess they were mistaken...)

Last edited by anwipr; 02-01-2007 at 05:41 PM..
anwipr is offline
Reply With Quote
View Public Profile
 
Old 02-01-2007, 09:42 PM Re: CSS Code Looks Different in Firefox/Opera...
GrayKard's Avatar
Skilled Talker

Posts: 72
Trades: 0
Quote:
a:link {
text-decoration: none;
color="#000099";
font-weight: bold; }

Ok, it looks like you are mixing how you do attributes inside a tag and how its done inside style rules.

You need to replace all the pairs: color="#000099"; etc.

With ones formatted like this: color:#000099;

Do that and then see how it displays in all the browsers.
__________________

Please login or register to view this content. Registration is FREE
GrayKard is offline
Reply With Quote
View Public Profile
 
Old 02-01-2007, 09:48 PM Re: CSS Code Looks Different in Firefox/Opera...
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Your color rules are incorrect. It should read:
color: #000099;

NOT color="#000099";
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 02-02-2007, 04:14 PM Re: CSS Code Looks Different in Firefox/Opera...
Skilled Talker

Posts: 50
Trades: 0
Ohhh! Thank you all so much; I totally overlooked that mistake. I guess I'd been working with too much HTML... I'll go change that. Thanks!!
anwipr is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to CSS Code Looks Different in Firefox/Opera...
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.17307 seconds with 12 queries