SitePoint Sponsor |
|
User Tag List
Results 1 to 12 of 12
Thread: CSS in Netscape Issue
-
Sep 26, 2000, 01:15 #1
- 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.
-
Sep 26, 2000, 06:44 #2
- 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
-
Sep 26, 2000, 10:28 #3
- 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.
-
Sep 28, 2000, 17:44 #4
- 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
-
Oct 1, 2000, 12:49 #5
- 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
-
Oct 2, 2000, 23:10 #6
- 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">')
}
-
Oct 3, 2000, 08:51 #7
- 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
-
Oct 3, 2000, 18:06 #8
- 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
-
Oct 3, 2000, 18:22 #9
- 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
-
Oct 3, 2000, 18:29 #10
- 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!
-
Oct 3, 2000, 19:10 #11
- 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
-
Oct 4, 2000, 03:23 #12
- 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