Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Kay
    Kay is offline
    New Coder
    Join Date
    Jul 2002
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Style sheet in Netscape 4.5

    <style type="text/css">
    <!--
    body{ font-family: sans-serif; font-size:12; color:#000000}
    A:link {text-decoration:none; font-family:sans-serif;color:#FF2B2B}
    A:visited {color: #FF804 ; text-decoration: none;}
    A:hover {color: #fA0A050 ; text-decoration: underline} -->
    </style>
    I'm using this style sheet on my website - I know the "hover" is not supported by Netscape, but the page renders in a serif font. Can some one give me the correct syntax to make it render in sans-serif in NS as well as in IE?
    It's not an outside style sheet - it's inside the < head > tag of my pages.
    TIA for any help.
    Don't postpone till tomorrow what you can make someone else do today!

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Posts
    166
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You need to specify px, pt, em (or whatever you decide) in the measurement:
    font-size:12
    s/b
    font-size:12px

    Otherwise, the styling attribute for that element is ignored in Netscape 4.
    Also watch your colors... You should have six characters after the #.

  • #3
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    Originally posted by PauletteB
    You should have six characters after the #.
    Or 3.
    #rgb
    is the same as
    #rrggbb
    where r,g, b and are all in between 0 and f

  • #4
    Regular Coder
    Join Date
    May 2002
    Location
    Helsinki, Finland
    Posts
    231
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Style sheet in Netscape 4.5

    For more valid CSS:
    Code:
    <style type="text/css">
     <!--
    body	{font:normal 12px sans-serif;color:#000000;background-color:#FFFFF8;}
    A	{text-decoration:none;font-family:sans-serif;color:#FF2B2B;background-color:#F8F8FF;}
    A:visited	{color:#FF8040;}
    A:hover	{color:#FA0A05;text-decoration:underline;}
    -->
    </style>
    
    NN4.x is very strict on how you write properties. Even whitespace in wrong place may fumble the whole sheet. NN4.x also doesn't support underscore (_) in name of classes/ids.
    Zvona
    First Aid for
    Web Design

  • #5
    Kay
    Kay is offline
    New Coder
    Join Date
    Jul 2002
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks all - I knew it was something really simple - just couldn't put my finger on it.
    Thanks for pointing out the missing number in the color value.
    Guess everything will look a whole lot better later today.
    --------------------------------------------------------------------------
    To all: Happy Coding in 2003!
    Don't postpone till tomorrow what you can make someone else do today!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •