css not working in Netscape
The more I learn, the less I know.
I have been designing a web site and using internet explorer to check my work. I haven't used netscape navigator until today because I just got a much larger hard drive that would hold both.
My problem is css. Everything is great in IE, but Netscape Navigator is ignoring the css. I'm sure (at least I hope) its something simple, but I've tried changing/switching around/etc everything, but nothing seems to work for NN.
My link between the tags is:
And the .css file is:(this isn't the entire file-just an example)
A:Link { text-decoration: none; font: verdana; color:#3300ff; }
A:visited { text-decoration: none; font: verdana; color:#3300ff; }
A:hover { text-decoration: none; color:#ff33ff; font: verdana; }
A:active ( text-decoration: none; font: verdana; color:#3300ff; }
P { font-family: times new roman; font-size: x-small; text-align: left; }
P.1A { font-family: times new roman; font-size: x-small; text-align: center; }
a:link, a:visited, a:active, a;hover {text-decoration:none}
Can anyone tell me how I screwed it up????????
Suzanne posted this at 17:36 — 2nd July 2004.
She has: 5,507 posts
Joined: Feb 2000
Netscape 4.x doesn't do hover.
Assuming you're not using that ancient browser, do this (actually, do this anyway):
1. take the HTML tags out of the style sheet () they don't belong!
2. link, active, visited, hover is the right order
3. validate your CSS -- http://jigsaw.w3.org/css-validator/
m3rajk posted this at 20:15 — 2nd July 2004.
They have: 461 posts
Joined: Jul 2003
i agree with suzanne: first make sure you're using something after 4.xx. it had partial css1 i think, at it's end.
second, always validate.
third realize that microsoft internet evil doesnt know what a standard is and wouldnt recognise one if it got broad-sided by one
then realize that if something works in ie, all you did was prove it works in ie. if you want to know it has cross browser: use netscape or opera.
if you want to prove latest w3c, use the latest mozilla. (browser only. if you want the latest stable...what netscape's latest will always be based on and somewhat behind, then you can use the suite.)
POSIX. because a stable os that doesn't have memory leaks and isn't buggy is always good.
Busy posted this at 22:37 — 2nd July 2004.
He has: 6,151 posts
Joined: May 2001
as well as everything else mentioned, there are a couple of errors in that example given
times new roman needs quotes
a;hover should be a:hover (bottom line, but you have already declared this)
make font into font-family
P.1A might cause you problems (starting with a a number), change it to P.A1
If you code for Netscape (or the stricest browser you can find), 9 out of 10 times you only have to code once, coding for IE usually involves adjusting to suit other browsers.
m3rajk posted this at 02:55 — 3rd July 2004.
They have: 461 posts
Joined: Jul 2003
netscape is stricter than mozilla? i thought ii was the other way around with mozilla being faster at aquiring the w3c updates
Abhishek Reddy posted this at 04:06 — 3rd July 2004.
He has: 3,348 posts
Joined: Jul 2001
Thus Mozilla supports more specs. They also support MS implementations like innerHTML and others. N4 is frozen in time.
Busy posted this at 04:28 — 3rd July 2004.
He has: 6,151 posts
Joined: May 2001
I find mozilla firebird useless as far as strictness goes, it's like IE and allows all sorts of stupid junk **yeah I know, upgrade to firefox ...**
NS4.* is the best browser strictness wise for HTML but not CSS
island597 posted this at 07:48 — 3rd July 2004.
They have: 18 posts
Joined: Jun 2003
Thanks for all of the great info!! Everything is now working in Netscape7.1 &
my .css validated with w3.org validator----Huraaaaahh! But my html is "sick" :eek:
My doctype is: HTML 4.01 Transitional
PROBLEMS:
error: document type does not allow element "META" here
error: document type does not allow element "LINK" here
I also have validation problems with "&" and "%"for example:
will "&" or "%" cause real problems? They wont validate, but links work fine.
Busy posted this at 10:06 — 3rd July 2004.
He has: 6,151 posts
Joined: May 2001
can you show us your exact html (just top section) where your doc tag, html and head tags are.
instead of & use &
the % isn't the problem, it's the lack of double quotes, BUT in saying that, have you set a width (ie 100%) for the actual table tag?
island597 posted this at 19:32 — 3rd July 2004.
They have: 18 posts
Joined: Jun 2003
I got most of the bugs worked out of my html, but validation still gives 1 error for the body tag---I can't believe it :eek: I've included some of the code-Any help will be greatly appreciated !
stuff stuff stuff
(various meta tags)
etc, etc,
error: document type does not allow element "BODY" here
I don't know why it doesn't like this-I tried closing the head tag
It just gave me an another error for closing the head tag
" I'll never try to wright code in IE again...although I like it better than NN! "
gohankid77 posted this at 20:06 — 3rd July 2004.
They have: 11 posts
Joined: Jul 2004
You don't have an after the tag and in the tag, you used an XHTML rule. Get rid of the "/" at the end of the tag. Then try it.
island597 posted this at 23:24 — 3rd July 2004.
They have: 18 posts
Joined: Jun 2003
Thanks gohankid77, that killed the last bug!!
Now, since I wrote all of my code in the very forgiving IE browser and didn't validate it I now have the dubious pleasure of fixing about 170 pages
.....But at least I know the code is good! I've learned alot. Thanks everybody!!
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.