1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

CSS problem with Firefox (inc. pic)

Discussion in 'CSS' started by versus2, Aug 10, 2005.

  1. #1
    Hi,

    i have the following code for a link in my css file:

    
    .link05:link    { color:black; font-size=12px; font-weight=bold; text-decoration:none; background-color:none;}
    .link05:visited { color:black; font-size=12px; font-weight=bold; text-decoration:none; background-color:none;}
    .link05:active  { color:blue; font-size=12px; font-weight=bold; text-decoration:none; background-color:none;}
    .link05:hover   { color:blue; font-size=12px; font-weight=bold; text-decoration:none; background-color:none;}
    
    Code (markup):
    I link to it this way: <a href="" class="link05">sdfsdf</a>

    As you can see in the attached pic. the link's style is the way i want it to be only in IE, and messed up in firefox. what am i doing wrong ? how can i fix it ?

    Thanks,
    E-A.
     

    Attached Files:

    • fox.jpg
      fox.jpg
      File size:
      32.8 KB
      Views:
      355
    versus2, Aug 10, 2005 IP
  2. SEbasic

    SEbasic Peon

    Messages:
    6,317
    Likes Received:
    318
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Create a seperate stylesheet for ie and link to it in the header like so..

    <!--[if gte IE 4]>
    <link rel="stylesheet" href="STYLE SHEET LOCATION" type="text/css" />
    <![endif]-->

    Then change the font sizes in each CSS file accordingly.
     
    SEbasic, Aug 10, 2005 IP
  3. versus2

    versus2 Well-Known Member

    Messages:
    796
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    110
    #3
    Ohh.. i forgot to mention it. It's already in a seperate stylesheet at the moment:

    <link href="styles.css" rel="stylesheet" type="text/css">
     
    versus2, Aug 10, 2005 IP
  4. SEbasic

    SEbasic Peon

    Messages:
    6,317
    Likes Received:
    318
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Yeah, 2 stylesheets - a seperate one for ie...
     
    SEbasic, Aug 10, 2005 IP
  5. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #5
    You stylesheet is messed up. You can't use '=' to separate property name and the value.

    J.D.
     
    J.D., Aug 10, 2005 IP
    SEbasic likes this.
  6. versus2

    versus2 Well-Known Member

    Messages:
    796
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    110
    #6
    Ohh.. I got it now. Thanks a lot SEbasic.
    It means that i'll have to replace the header of more than 43,000 html pages now :( but i guess that better late than never.

    Thanks J.D. You're right. It's working this way too but i'll change it to ":" anyway.
     
    versus2, Aug 10, 2005 IP
  7. versus2

    versus2 Well-Known Member

    Messages:
    796
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    110
    #7
    I won't need 2 stylesheets after all..
    the "=" instead of ":" was the problem and it was the reason FF hasn't showed it right (and for some reason IE did).

    Thanks a lot again guys :) you've been very helpful !
     
    versus2, Aug 10, 2005 IP
  8. SEbasic

    SEbasic Peon

    Messages:
    6,317
    Likes Received:
    318
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Yeah, my bad... I should have looked more closely :rolleyes:
     
    SEbasic, Aug 10, 2005 IP
  9. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Colons is the only way. It doesn't matter if some browsers can understand any other delimiters. Always follow the spec and you'll save yourself a lot of time.

    J.D.
     
    J.D., Aug 10, 2005 IP
  10. jrd1mra

    jrd1mra Peon

    Messages:
    243
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #10
    firefox has the most advanced css compilation available. IE has not fully caught up with technology, this is one reason why fire fox sometimes displays css differently, however I believe the market for firefox os around %5 so I dont worry too much about it.
     
    jrd1mra, Aug 10, 2005 IP
  11. Steve MacLellan

    Steve MacLellan Peon

    Messages:
    29
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #11
    I'm surprised by Firefox only being 5%. Of course there are a number of browsers that all use the Gecko rendering engine. Since they all render the pages very closely it would be kind of cool to see the percentages based on other people's stats. In July the percentage of Gecko users visiting my site was 14.95%.

    Best Regards,
    Steve MacLellan
     
    Steve MacLellan, Aug 10, 2005 IP
  12. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #12
    It depends on who your audience is. I see about 30-40% of users using FireFox. Check out this thread for some numbers - 13885.

    J.D.
     
    J.D., Aug 10, 2005 IP