SitePoint Sponsor

User Tag List

Results 1 to 12 of 12
  1. #1
    SitePoint Member
    Join Date
    Aug 1999
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well I am trying to use two seperate codes for link colors on my site since I have dark side menus and white in the middle of my site. The page is set up as one big table with three cells. Well I set up the "Class" tags for the link colors and put the class tag in side the <td> tags for the two columns. Assuming the middle column would use the default link colors I had in the body tags, I noticed that it wasn't, and that middle cell was using the CSS link colors as well and it shouldn't be. It looks fine in IE, but on Netscape 4.73 it is wrong, the middle area should be using the body tag link colors and it is not. Any ideas, I have been pulling my hair out for days trying to get this.

    This test page is at:
    http://www.vhlinks.com/test2.html

    Thanks for any advice or help.
    Webmaster Van Halen Links
    The Van Halen Internet Resource Guide
    http://www.vhlinks.com


  2. #2
    Serial Publisher silver trophy aspen's Avatar
    Join Date
    Aug 1999
    Location
    East Lansing, MI USA
    Posts
    12,937
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I looked through your code, and you aren't using any css. You are however using alot of javascript. As to why its not working, well netscape and IE have js compatibility problems, and since Frontpage and IE are made by the same company guess what kind of code Frontpage will generate?

    Chris

  3. #3
    SitePoint Member
    Join Date
    Aug 1999
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am using CSS, I am linking to an external style sheet which is referenced in the <head> section. I don't think the javascript is the issue however, as this does work fine on another site I tried with multiple javascript usage.
    Webmaster Van Halen Links
    The Van Halen Internet Resource Guide
    http://www.vhlinks.com


  4. #4
    SitePoint Enthusiast
    Join Date
    Sep 2000
    Location
    Australia
    Posts
    93
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In my experience, external CSS Files and Netscape don't go together too well.

    Anyway, what I do is the following.
    Define 2 classes:
    .darklink and .lightlink

    set them up using CSS to whatever values, and then I put them inside each <a> tag.
    You don't need to do it this way, but I find it easier organisationally to do so.

    This probably isn't your problem, I think your problem will be to do with NS and External CSS Files.

    So I guess you could either embed the information inside the head of each page (using <style> tags), or you could do what I do and use an SSI call (if your server has it enabled) to hold it externally but have the server insert it, so you don't get the Netscape problem.

    Does that make sense???

    Matt


  5. #5
    SitePoint Member
    Join Date
    Oct 2000
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I had a similar problem and ended up running a browser detect script and using a different style sheet for IE than for Netscape.

    <Script language="javascript" type="text/javascript"><!--
    {if ((navigator.appName =="Netscape"))
    { document.write("<LINK REL=stylesheet TYPE='text/css' HREF='stylesheet-ns.css'>");
    }else
    { document.write("<LINK REL=stylesheet TYPE='text/css' HREF='stylesheet-ie.css'>");
    }}
    //-->
    </script>
    Lyn

  6. #6
    The Hiding One lynlimz's Avatar
    Join Date
    Jul 2000
    Location
    Singapore
    Posts
    2,103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hmm...Iswall,

    CSS on IE ad Mozilla moilestones or netscape 6 works perfectly fine together..in fact..it can never be better for netscape.
    therefore, instead of limitng your mozilla audience of some good stuffs..you can use the below code which i use on my site http://nortiq.com

    //use stylesheet base on browser
    var navVer = navigator.appVersion;
    if(navigator.appName == 'Netscape') {
    if(navVer.substr(0,3) < 5) {
    document.write('<link rel="stylesheet" type="text/css" href="http://nortiq.com/ns.css">')
    }
    else if(navVer.substr(0,3) >= 5) {
    document.write('<link rel="stylesheet" type="text/css" href="http://nortiq.com/style.css">')
    }
    } else {
    document.write('<link rel="stylesheet" type="text/css" href="http://nortiq.com/style.css">')
    }

  7. #7
    SitePoint Member
    Join Date
    Oct 2000
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    lynlimz

    Thanks for the tip. The link to the IE style sheet in my script was misleading. It simply uses the same style sheet for every browser except Netscape. From what I've seen of the beta version, when Netscape 6 is released I'll have to test for the version and possibly add a third style sheet to the options.

    Anyway, I think we're both accomplishing the same thing in slightly different ways.

    Lyn

    P.S. Is your first name Lyn with one "n" too?
    Lyn

  8. #8
    The Hiding One lynlimz's Avatar
    Join Date
    Jul 2000
    Location
    Singapore
    Posts
    2,103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm..while optimising my pages, I modified it to make it better...it works with netscape 6( or rather mozilla milestones ) and IE too

    <script language="JavaScript" type="text/javascript">
    var NAV=navigator;
    if ( (NAV.appName == 'Netscape') && (parseInt(NAV.appVersion) <= 4) ) {
    document.write('<link rel="stylesheet" type="text/css" href="ns.css">')
    }
    else {
    document.write('<link rel="stylesheet" type="text/css" href="ns.css">')
    }
    </script>

    nope..LOL...my name's Lyon

  9. #9
    SitePoint Member
    Join Date
    Oct 2000
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Lyon

    This one's a keeper. Thanks. One question though, am I missing something? It looks like both links are to the same style sheet. Did you mean this?

    <script language="JavaScript" type="text/javascript">
    var NAV=navigator;
    if ( (NAV.appName == 'Netscape') && (parseInt(NAV.appVersion) <= 4) ) {
    document.write('<link rel="stylesheet" type="text/css" href="ns.css">')
    }
    else {
    document.write('<link rel="stylesheet" type="text/css" href="style.css">')
    }
    </script>

    Lyn

  10. #10
    The Hiding One lynlimz's Avatar
    Join Date
    Jul 2000
    Location
    Singapore
    Posts
    2,103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ah yes! darn! sorry..i forgot to change it..coz i was testing my netscape style sheets..LOL

    sorry!

  11. #11
    SitePoint Member
    Join Date
    Oct 2000
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Don't worry, I'm just glad I wasn't misunderstanding your code. LOL
    Lyn

  12. #12
    The Hiding One lynlimz's Avatar
    Join Date
    Jul 2000
    Location
    Singapore
    Posts
    2,103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    LOL..yeah sure
    if you got better ways......tell me! ehehz..


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
  •