Welcome to WebmasterWorld Guest from 23.22.250.113

Forum Moderators: not2easy

Message Too Old, No Replies

external css doesn't always work

works in some browsers, but not all

     

tilt

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

10+ Year Member



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?

topr8

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

WebmasterWorld Senior Member topr8 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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?

fathom

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

WebmasterWorld Senior Member fathom is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



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.

msr986

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

WebmasterWorld Senior Member 10+ Year Member



>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?

gsx

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

10+ Year Member



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.

tedster

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

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



"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.

fathom

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

WebmasterWorld Senior Member fathom is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



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.

tilt

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

10+ Year Member



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
 

Featured Threads

Hot Threads This Week

Hot Threads This Month