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 23rd, 2003, 05:34 PM
Tobbe Tobbe is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Sweden
Posts: 23 Tobbe User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Tobbe
external css, body-tag

Hi,
I have a page where I want to use an external css file to specify the font-family and font-size of the body in all the pages that include that css-file. I include it by doing this: <link rel="stylesheet" type="text/css" href="../main.css" /> and in that file I have this (among other things):
Code:
body
	{
		font-family: helvetica, arial;
		font-size: 12px;
		color: #000000;
		background-color: #FFFFFF;
		margin: 0px;
		border: 0px solid black;
	}
It works in Opera 7.x but it doesn't work in IE 5.0, it ignores everything I put in there... It works if I copy the body tag to the page that should use it, but I don't want to do that...

What is wrong?

Reply With Quote
  #2  
Old December 25th, 2003, 06:29 AM
Tobbe Tobbe is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Sweden
Posts: 23 Tobbe User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Tobbe
*bump*

Reply With Quote
  #3  
Old December 26th, 2003, 11:04 AM
TRshady TRshady is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 247 TRshady User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 Days 1 h 54 m 28 sec
Reputation Power: 6
Could you post the link the the page please?

That will help further to see the problem but it could be a case of you having set the boy properties different in the page itself which has higher priorities over the external css which is ignored.

Reply With Quote
  #4  
Old December 26th, 2003, 11:46 AM
magma's Avatar
magma magma is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Apr 2003
Location: Italy, EU
Posts: 517 magma User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 45 m 8 sec
Reputation Power: 6
Really strange!!
I've tried it in MSIE6 and works...
I've also checked the compatibility between the CSS properties you've used and MSIE5 but I haven't found anything wrong!

TRshady is right: post a link to the page!

Good luck.
__________________
Cheers, Dave

Reply With Quote
  #5  
Old December 26th, 2003, 02:02 PM
Tobbe Tobbe is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Sweden
Posts: 23 Tobbe User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Tobbe
Here's a link to the page I wrote it for: http://home.swipnet.se/~w-63611/NyaFS/index.html But I have to warn you - it is in Swedish

Reply With Quote
  #6  
Old December 26th, 2003, 02:07 PM
Tobbe Tobbe is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Sweden
Posts: 23 Tobbe User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Tobbe
I've written a small test-page displaying the error as well. Here's a link: http://home.swipnet.se/~w-63611/NyaFS/test.html (This one is in English)

Reply With Quote
  #7  
Old December 26th, 2003, 02:20 PM
joh joh is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 8 joh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Solution

External css files should not have the <style> tags in them. They should have no HTML at all....

remove the <style..> </style> tags and it should work...

Reply With Quote
  #8  
Old December 26th, 2003, 02:23 PM
Tobbe Tobbe is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Sweden
Posts: 23 Tobbe User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Tobbe
Ahh, sweet! Thanks!

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > external css, body-tag


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
Stay green...Green IT