homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

external css doesn't always work
works in some browsers, but not all

 7:57 pm on Oct 25, 2002 (gmt 0)

I have an external css file that I link with as follows:

<link rel="stylesheet" href="css/mycssfile.css" type="text/css" >

inside my <head> tag.

Among other things, the css file specifies a background color for the body of the document:
body {
background: #f7bc5b;

It works just fine in Opera 6, in IE5.5, and in Netscape6.2 on my pc. But when the client ran it on their pc, there was no background color. I know they're using IE, but I'm not sure what version. This seems like such a basic thing. Is it possible some versions of IE don't support css?



 8:04 pm on Oct 25, 2002 (gmt 0)

silly point maybe, but have you uploaded the style sheet? or is their browser set to cache the page and not look for a new version?


 8:07 pm on Oct 25, 2002 (gmt 0)

If the refernced link is correct for an external CSS it no different than any other link - browser types and versions don't go around saying "stay away from that one".

It is quiet possible though that the client has selected fonts, colors for links, background -- many people like larger font size so they can read easily.


 8:20 pm on Oct 25, 2002 (gmt 0)

>Among other things, the css file specifies a background color for the body of the document:

Are the other things working?

>background: #f7bc5b;

Although this should work you may want to try background-color

BTW, does the "background: #f7bc5b;" work when you imbed the style in the document?


 9:06 pm on Oct 25, 2002 (gmt 0)

I've seen this before with my own site. I found it to be rare - but odd because my site has three frames and two used the CSS file but one did not (they all use the same CSS file to reduce bandwidth). The really odd thing, clicking refresh brought it all back nicely!

There must be a minor problem with some browsers.


 11:21 pm on Oct 25, 2002 (gmt 0)

"background" is the shorthand property for setting all background properties in one rule (-color, -image, -repeat, -attachment, -position) Explorer claimed support for the shorthand rule beginning with v.4, but Netscape did not support it until v.6.

Netscape 4 did not support two of the involved properties (background-attachment and background-position) so they couldn't support the shorthand rule.

Source: W3Schools CSS Background Properties [w3schools.com]

Also, most of the shorthand CSS rules seem to me to have more quirks in their browser support than the "basic" forms, so switching over to background-color:#f7bc5b; sounds like a good suggestion.


 11:30 pm on Oct 25, 2002 (gmt 0)

Good point tedster... there are many variation to what each browser will support (particularly with Netscape and CSS).

Most of my sites current traffic are 94% IE, so I tend to forget support problems in other browser types.


 4:30 am on Oct 27, 2002 (gmt 0)

Thanks for the replies. It turns out my client did have some accessibility settings on their computer set to ignore website colors. It wasn't the internet settings on IE, but the settings in the Windows control panel. Now they're telling me that a lot of websites look different.... No kidding :-0

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved