|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
CSS not showing in netscape
Hi,
I'm working on a webpage, and was beginning to get quite affectionate with the way it looks, when somebody suggested I'd better test it in Netscape Navigator (I use Internet Explorer 6). So, I downloaded NN 7.1, and Aarghh!! For some reason, it's completely ignored the external style sheet I've linked to and looks comparatively rubbish! I'd be grateful if anybody could tell me why that could be. In the page head I have: Code:
<link rel="stylesheet" href="sheet1.css" type="text/css"> In the style sheet I have (for example): Code:
<style>
<!--
body {background: black;
scrollbar-base-color:rgb(255,129,23);
scrollbar-track-color:rgb(255,129,23);}
-->
</style>
<style>
<!--
.main {
color: white;
text-align: left;
font-style: normal;
font-size: medium}
-->
</style>
In the page code: Code:
<p class = "main">
This section is under construction- please visit again soon.
</p>
-The stylesheet is completely ignored, seemingly. Help!!! |
|
#2
|
||||
|
||||
|
remove the tags and html comments from the css file.
Code:
body {
background: black;
color:white; /* always supply a color if you have a set a background */
scrollbar-base-color:rgb(255,129,23); /*silly msie style should be avoided */
scrollbar-track-color:rgb(255,129,23); /*silly msie style should be avoided */
}
.main {
background:transparent; /* same as above */
color: white;
text-align: left;
font-style: normal;
font-size: medium;
}
the comments in the /* */ are not neccesary ![]() |
|
#3
|
|||
|
|||
|
Akh,
much appreciated, that worked! I'll also take on board your CSS advice. I have a question though: Will this change affect how the page appears in older browsers? I thought the tags were necessary. |
|
#4
|
||||
|
||||
|
no and no
tags are only for internal style sheets and as for the obvious - why would a CSS file (file only for style sheets only) need something to tell it is a stylesheet.
__________________
Mistakes are made, you pay for them.. then you do it again |
|
#5
|
|||
|
|||
|
now you mention it, that is kinda obvious.
Do you use the <-- comments --> for internal style sheets (I'm guessing yes)? |
|
#6
|
|||
|
|||
|
now you mention it, that is kinda obvious.
Do you use the <-- comments --> for internal style sheets (I'm guessing yes)? |
|
#7
|
||||
|
||||
|
you use /* and */ for comments in style sheets just like in js
IMPORTANT: no // one line comments this is because style sheets often have <!-- and --> in them anyway as it blocks older browsers who don't understand css from displaying the code on the output page <style type="text/css"> <!-- /* this is to set the bg of the body to blue */ body{background-color:#0000ff} /* this is another comment */ --> </style> hope this helps |
|
#8
|
|||
|
|||
|
That helps a lot. Appreciated.
|
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > CSS not showing in netscape |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|