Forum Moderators: not2easy

Message Too Old, No Replies

external stylesheet background color issues on macs

background color specified in external sheets don't show on Macs

         

kirideth

8:10 am on Jan 15, 2004 (gmt 0)

10+ Year Member



When included in a global stylesheet,

body{
background-color: #000000;
}

will show up black as it is meant to be, however, if I use the same code in an external sheet, it shows up whatever the user's default color is, which is usually white. All other attributes specified in the stylesheet show up properly. This has only been an issue on Macintosh platforms in all its major browsers. Please help. I have a site with many, many pages that would be much easier to maintain if the stylesheets were external.

isitreal

8:27 pm on Jan 15, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Are you seeing this problem in Safari?

kirideth

10:22 pm on Jan 15, 2004 (gmt 0)

10+ Year Member



Yes, the problem occurs in Safari as well as in the Mac version of IE and Mozilla.

luckydude

10:27 pm on Jan 15, 2004 (gmt 0)

10+ Year Member



you may have to use bgcolor="#000000" on the body tag. I looked at www.dpreview.com which also has black color as their background color and they have their background color defined inside the body tag. I don't think it will take you that long to add bgcolor="#000000" on every page.

luckydude

pageoneresults

10:35 pm on Jan 15, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hmmm, try using this...

body{background:#000000;}

I do quite a bit of browser testing with IE5 on the Mac and have not seen any issues with background colors.

kirideth

10:37 pm on Jan 15, 2004 (gmt 0)

10+ Year Member



While I *can* do that for all the (literally) hundreds of pages, I would prefer the flexibility of an external stylesheet so that whoever maintains the site after me can change it as he or she seems fit without changing the tag on every page. I know that the property works in those browsers, as putting the raw CSS in the header works on a Mac. I also know that linking stylesheets works, as my hyperlinks and text show up the right style and color. But for some reason that property won't work on Macs if the stylesheet is external.

kirideth

10:42 pm on Jan 15, 2004 (gmt 0)

10+ Year Member



Okay. I think I've tried using

body{background:#000000;}

before, but I can try it again. Time to find my Mac testers...

pageoneresults

11:43 pm on Jan 15, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I forgot to ask, what does your external style sheet call look like? Are you using a commented call? Like this...

<!--

-->

kirideth

12:49 am on Jan 16, 2004 (gmt 0)

10+ Year Member



Currently, yes.

pageoneresults

12:53 am on Jan 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Try removing the comments and see what that does. I believe I remember seeing issues when using that particular format for calling external stylesheets. Try one of these two...

<link href="http://www.example.com/css/file.css" type="text/css" rel="stylesheet">

Note this second one uses the @import rule which is not read by older browsers, e.g. NN4.x...

<style type="text/css">@import url(http://www.example.com/css/file.css);</style>