CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 12th, 2003, 07:31 PM
million1977 million1977 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: Aberdeen, Scotland
Posts: 48 million1977 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 51 m 3 sec
Reputation Power: 5
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!!!

Reply With Quote
  #2  
Old December 12th, 2003, 07:58 PM
Akh's Avatar
Akh Akh is offline
|<.+#f@#+.&.|
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2002
Location: norway
Posts: 2,622 Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 3 Weeks 6 Days 2 h 20 m 44 sec
Reputation Power: 548
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

Reply With Quote
  #3  
Old December 12th, 2003, 08:17 PM
million1977 million1977 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: Aberdeen, Scotland
Posts: 48 million1977 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 51 m 3 sec
Reputation Power: 5
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.

Reply With Quote
  #4  
Old December 12th, 2003, 08:22 PM
4xk's Avatar
4xk 4xk is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 42 4xk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
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

Reply With Quote
  #5  
Old December 12th, 2003, 08:27 PM
million1977 million1977 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: Aberdeen, Scotland
Posts: 48 million1977 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 51 m 3 sec
Reputation Power: 5
now you mention it, that is kinda obvious.

Do you use the <-- comments --> for internal style sheets (I'm guessing yes)?

Reply With Quote
  #6  
Old December 12th, 2003, 08:32 PM
million1977 million1977 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: Aberdeen, Scotland
Posts: 48 million1977 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 51 m 3 sec
Reputation Power: 5
now you mention it, that is kinda obvious.

Do you use the <-- comments --> for internal style sheets (I'm guessing yes)?

Reply With Quote
  #7  
Old December 12th, 2003, 08:36 PM
4xk's Avatar
4xk 4xk is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 42 4xk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
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

Reply With Quote
  #8  
Old December 13th, 2003, 05:06 AM
million1977 million1977 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: Aberdeen, Scotland
Posts: 48 million1977 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 51 m 3 sec
Reputation Power: 5
That helps a lot. Appreciated.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > CSS not showing in netscape


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway