Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

css background def: IE5.5 vs IE6 - problem.

Status
Not open for further replies.

JulianUK

Programmer
Apr 17, 2002
73
GB
Hi

I give up sometimes with the lack of consistency between versions of - well, everything!

I have a problem with CSS between IE5.5 and IE6. 6 does not show my background as defined in the stylesheet.

Simple example, my .css is as follows:

body {background: black url(\1-bg.jpg) 0 0 no-repeat fixed;}

And my .asp page contains thus:

..header...
<link rel=&quot;stylesheet&quot; title=&quot;test&quot; href=&quot;test.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot;>
<body>
<h1>Can you see the background? </h1>
</body>
...html etc...

This works fine on 5.5, but no background on 6. Any colours etc. from the .css are shown fine.

Is there a known bug or fix - or don't tell me, another code-around?!

The background is really pivotal to the style of my pages too! Grrrr....

Thanks

Julian
 
Just for giggles, what happens if you expand your css definition - example:

body {background: black; background-image: url(\1-bg.jpg); background-position:0% 0%; background-repeat: no-repeat}


Have no idea if this will solve the problem but it's worth a try! There's always a better way...
 
Hi tviman

I think that solution did work (I found it out from another reference site) but a far simpler solution was to include the correct DOCTYPE statement &quot;...Transitional..&quot; which made it work. The shorthand I was using seems to be ok then.

yes i know, it should've been there in the first place...!

thanks for the input

Julian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top