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 June 10th, 2004, 04:40 PM
Kick The Donkey's Avatar
Kick The Donkey Kick The Donkey is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Location: Georgia
Posts: 24 Kick The Donkey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 45 m 19 sec
Reputation Power: 0
Send a message via MSN to Kick The Donkey
My Fixed Background does not work in IE

Here's the page:

http://ktd.sytes.net/files/index.html

In Mozilla, on Windows and Linux, and Konqueror, the image of the donkey says fixed in the center of the screen. However, in IE, it scrolls on down. Not sure what I'm doing wrong here. I think it may have something to do with my layered divs.

Any ideas? Here my style sheet:

http://ktd.sytes.net/files/float3.css

Thanks!

Reply With Quote
  #2  
Old June 10th, 2004, 05:21 PM
Akh's Avatar
Akh Akh is offline
|<.+#f@#+.&.|
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2002
Location: norway
Posts: 2,715 Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 4 Weeks 17 h 42 m 44 sec
Reputation Power: 642
seems like this is implemented a bit diffrent.

take a look at quirksmode.org http://www.quirksmode.org/css/background.html

just a a short quote for that page :
If you want to use W3C's fixed you'll have to accept that Explorer Windows doesn't show it as intended.

Reply With Quote
  #3  
Old June 10th, 2004, 05:43 PM
kk5st's Avatar
kk5st kk5st is offline
Thanks Johnny Hart (BC) R.I.P.
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: May 2003
Location: Dallas
Posts: 4,674 kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 1 Month 3 Days 15 h 15 m 50 sec
Reputation Power: 687
Moz correctly positions a fixed element relative to the viewport. IE, as is common, gets it wrong and attaches to the element it's declared in. Set the background image this way;
Code:
body {
    color : #a52a2a;
    background : #fdfdfd url(./images/donkey.gif) fixed no-repeat center center;
    width : 100%;
    font : 12px "Trebuchet MS", Arial, Helvetica, Tahoma, sans-serif;
    margin-bottom: 25px;
    }
It won't make any difference to Moz or Opera, but it will make it seem as if IE knows what it's doing. Quotes are not needed for url( … ). width:100% may cause problems in IE. I haven't figured out the particulars, but I've fixed a lot of IE layout brain-farts by removing that declaration.

cheers,

gary
__________________
There are those who manage to build a web site without knowing what they're doing; thereby proving to themselves they do, indeed, know what they're doing.

My html and css workshop, demos and tutorials.
Ask a better question, get a better answer.

Last edited by kk5st : June 10th, 2004 at 05:47 PM. Reason: silly smilies/stupid typing fingers

Reply With Quote
  #4  
Old June 10th, 2004, 06:01 PM
kk5st's Avatar
kk5st kk5st is offline
Thanks Johnny Hart (BC) R.I.P.
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: May 2003
Location: Dallas
Posts: 4,674 kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 1 Month 3 Days 15 h 15 m 50 sec
Reputation Power: 687
Hi Akh,

You've definitely changed your image

IE honors background-attachment by mis-applying the specs, as you point out. It can be made to simulate correct behavior only if the background-image is attached to <body>. In that case, the body emulates the viewport for this purpose.

cheers,

gary

Reply With Quote
  #5  
Old June 10th, 2004, 06:18 PM
Akh's Avatar
Akh Akh is offline
|<.+#f@#+.&.|
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2002
Location: norway
Posts: 2,715 Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 4 Weeks 17 h 42 m 44 sec
Reputation Power: 642
yeah, thought it was time for a change, had the other avatar for too long.

yet another litt msie quirk to put on the list.
sometimes i don't care too much about msie's oddities, i prefer to do it the proper way and let msie do what it like
(as long as it doesn't look too bad in msie, that is)

Reply With Quote
  #6  
Old June 10th, 2004, 08:26 PM
Kick The Donkey's Avatar
Kick The Donkey Kick The Donkey is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Location: Georgia
Posts: 24 Kick The Donkey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 45 m 19 sec
Reputation Power: 0
Send a message via MSN to Kick The Donkey
Quote:
Originally Posted by kk5st
IE honors background-attachment by mis-applying the specs, as you point out. It can be made to simulate correct behavior only if the background-image is attached to <body>. In that case, the body emulates the viewport for this purpose.


Man, you guys are good...

So, if I apply the background to the body tag, will it show through the other 3 div tags 'on top' of it (each with a bg color)? I'd test it now, but I don't have a windows PC at home... I'll have to do it when I get to work tommorrow...

thanks for the help.

Reply With Quote
  #7  
Old June 10th, 2004, 09:51 PM
Kick The Donkey's Avatar
Kick The Donkey Kick The Donkey is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Location: Georgia
Posts: 24 Kick The Donkey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 45 m 19 sec
Reputation Power: 0
Send a message via MSN to Kick The Donkey
Quote:
Originally Posted by kk5st
Moz correctly positions a fixed element relative to the viewport. IE, as is common, gets it wrong and attaches to the element it's declared in. Set the background image this way;
Code:
body {
    color : #a52a2a;
    background : #fdfdfd url(./images/donkey.gif) fixed no-repeat center center;
    width : 100%;
    font : 12px "Trebuchet MS", Arial, Helvetica, Tahoma, sans-serif;
    margin-bottom: 25px;
    }
It won't make any difference to Moz or Opera, but it will make it seem as if IE knows what it's doing. Quotes are not needed for url( … ). width:100% may cause problems in IE. I haven't figured out the particulars, but I've fixed a lot of IE layout brain-farts by removing that declaration.


I tried that in Moz (well, epiphany. Same thing, right?), and it didn't work anymore. I think its because of the other divs sitting on top of the body...

Reply With Quote
  #8  
Old June 11th, 2004, 03:14 AM
kk5st's Avatar
kk5st kk5st is offline
Thanks Johnny Hart (BC) R.I.P.
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: May 2003
Location: Dallas
Posts: 4,674 kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 1 Month 3 Days 15 h 15 m 50 sec
Reputation Power: 687
Any element that you want the background image to be visible through must be background-color:transparent;, the default. The body's background color will fill in.

cheers,

gary

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > My Fixed Background does not work in IE


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 3 hosted by Hostway
Stay green...Green IT