SitePoint Sponsor

User Tag List

Results 1 to 11 of 11

Thread: Netscape

  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2002
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Netscape

    Hi

    I'm using an external css file to set 3 styles that I want for all of my pages.

    This works perfectly in IE (any recent version) but Netscape does not recognise it at all!

    Can someone please help.

    [VBS]a.nav:hover {font-family: verdana}
    body {background-image: url(ins_files/new_curve_goodies.gif);
    font-family: Arial}[/VBS]

    Neither the LINK or STYLE method seem to work.
    I would prefer using the LINK method as I have quite a few pages.
    Thanks.

    Salvo

  2. #2
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    Which version of Netscape, Netscape 6.22/Mozilla or earlier, since Netscape 4.7x never supported the "hover" try the following, the body CSS should work even in Netscape 4.7x:

    body {
    background-image : url("http://www.yoursite.com/yourimage.gif");
    font-family : arial, verdana, helvetica, sans-serif;
    }
    a.nav:hover {
    font-family : arial, verdana, helvetica, sans-serif;
    }

    If the above doesnít work I would presume you havenít linked your CSS file correctly with your HTML syntax.

    };-) http://www.xhtmlcoder.com/

  3. #3
    SitePoint Enthusiast
    Join Date
    Mar 2002
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks xhtmlcoder


    I totally understand where you're coming from.
    The funny thing is, I did test using 4.7, but the only style that worked was the hover.

    However, this was done rather unconventionally, where I had a server-side include, which contained its own embedded style tag, which worked. But the style settings from the main page (the body: font-family) did not!


    Salvo

    [vbs]a.nav:hover {
    font-family: Verdana;
    }
    BODY {
    background-image: url("ins_files/new_curve_goodies.gif");
    font-family: Arial;
    }[/vbs]

  4. #4
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    Do you have the URI of that page where you are getting the errors, I typically test in the old Netscape 4.7x, Netscape 6.22/Mozilla and Micro$oft IE 5.0 - 6.0 so if one saw the HTML page I should be able to see what is going wrong with the page in question myself.

    };-) http://www.xhtmlcoder.com/

  5. #5
    SitePoint Enthusiast
    Join Date
    Mar 2002
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for helping out.

    The url is http://cog.lboro.ac.uk/cohfweb/

    (Since I've updated the main page, include page and css file, the hover no longer works as I said before)

    All I want is the site to be consistent for both IE and Netscape (only 3 styles).

    Code:
    body         { background-image: url('ins_files/curvebg.gif'); font-family: Arial }
    
    a.nav        { font-size: 12pt; font-weight: bold; color: #FFFFFF; text-decoration: none }
    a.nav:hover  { font-weight: normal }
    Salvo

  6. #6
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    As I can see your CSS is working as you have written, obviously in the old Netscape 4.7x your "link hover-state is ignored" like I originally stated, hence you links stay bold with an underline.

    However, your CSS could have been improved because in Netscape 4.7x it wasn't applying the Arial font to your Hyperlinks, or the main body area - I assume you wanted the entire page in Arial.

    Here is the altered CSS:

    a.nav {
    font-family : Arial, Verdana, Helvetica, Sans-Serif;
    color : #ffffff;
    font-size : 12pt;
    font-weight : bold;
    text-decoration : none;
    background-color : transparent;
    }

    a.nav:hover {
    font-weight : normal;
    font-family : Arial, Verdana, Helvetica, Sans-Serif;
    }

    body {
    background-image : url("http://cog.lboro.ac.uk/cohfweb/ins_files/curvebg.gif");
    }

    body, td {
    font-family : arial, verdana, helvetica, sans-serif;
    }

    Well above is how the CSS should be written for full W3C compliance, adding the background-color, generic font family and ensuring Arial font was applied to the table divisions.

    Plus putting " " for the image stopped the buggy Netcape 4.7x choking. I Tested in all browsers that I mentioned before, it is the best you'll get using CSS only.

    };-) http://www.xhtmlcoder.com/
    Last edited by xhtmlcoder; Apr 26, 2002 at 03:45.

  7. #7
    SitePoint Enthusiast
    Join Date
    Mar 2002
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks a lot xhtmlcoder.

    I didn't realise there were requirements for W3C compliance for css - I was previously going by whatever FrontPage did!

    I will test it again using Netscape in the next couple of days (I don't have it on this computer you see).

    However, I do have one question.
    Why put all these fonts in??

    Code:
    font-family : Arial, Verdana, Helvetica, Sans-Serif;
    Thanks again.

    Salvo

  8. #8
    SitePoint Enthusiast
    Join Date
    Apr 2002
    Location
    BC, Canada
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Reason behind multiple fonts

    Hi Salvo, just came across this thread.

    The reason for multiple font values with the font-family attribute is to accomodate useability on systems that do not have the intended font-family available.

    Hence, the browser will start from the left and work its way in. It will render the first font it comes across that it actually has access to on its system.

    It is a nice added feature that is good to get in the habit of coding. The last font listed is often either, serif or sans-serif. Basically this is telling the browser to use the default system font of the type specified (serif OR sans-serif).
    Go Leafs Go!!!!!!!!

  9. #9
    .net install meltdown
    Join Date
    May 2001
    Location
    View Ridge
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Salvo
    I was previously going by whatever FrontPage did!
    Putting your trust in frontpage? Are you mad?

  10. #10
    SitePoint Addict TegSkywalker's Avatar
    Join Date
    Nov 2001
    Location
    USA
    Posts
    214
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by isotope235


    Putting your trust in frontpage? Are you mad?
    Ha I am hoping he is using at least Front Page 2000 because Front Page 2002 (comes with Office XP) is just plain horrid and butchers your pages. Especially when it tries to bind CSS styles and adds M$ propietary garbage. Ya I tried out both and Front Page 2000 is the better of the two. That is if you still use that piece of garbage.

  11. #11
    Posts rarely lloydi's Avatar
    Join Date
    Jan 2002
    Location
    Swindon UK
    Posts
    620
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you do have a page that has been built using FrontPage, you could try running it through a cleaner before you deploy the file live. For example DreamWeaver has a clean-up HTML option (but then if you had DW, you'd use that, wouldn't you?). Also you could try downloading HTMLtidy from W3C and the Tidy Gui as a front-end.

    Sorry, too busy to find URLS, but you'll find them at w3c - follow the trail ...
    Build Your Own Web Site the Right Way!
    A beginners' HTML/CSS book with web standards at its heart
    The Ultimate HTML Reference
    A complete reference, in glorious hardback


Bookmarks

Posting Permissions

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