Background fixed with IE

proxy

Joined: 2005-10-17
Posts: 80
Posted: Mon, 2005-10-17 09:32

Hi,

is there a way to fix the backgroundimage for IE?
I've tried adding background-attachment:fixed in theme.css.
With FireFox it worked well, but not with IE.
The "old" way, writing bgproperties=fixed in the body-part i tried too,
but even this had no effect in IE. Perhaps i did something wrong.
Did anyone had this problem too?

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Mon, 2005-10-17 14:43

Have you had a look at this site to see how they do it? http://www.csszengarden.com/ and is that what you're talking about?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
RwD
RwD's picture

Joined: 2005-01-09
Posts: 383
Posted: Tue, 2005-10-18 08:45

default setting for background-attachement is "scroll". So it seems IE is not taking the new setting. I've never had any problems with this so I am unsure if it is a bug or something. To make sure the rule is used you can suffix the css line with "!important" (before the semi colon) so it reads "background-attachment: fixed !important;". Then we are sure the rule is used.

css zengarden uses this normal css method to get the background image at the top left of the document:
background: url(/001/zen-bg.jpg) no-repeat top left;
You can try this as well.

Don't you have an example? Mmakes it a lot easier to spot the place where it is goign wrong at.
______________________
I made a theme for G2, try it :)

 
proxy

Joined: 2005-10-17
Posts: 80
Posted: Wed, 2005-10-19 21:16

After a little bit of googeling, found some pages writing about a bug in IE. IE accepts the "fixed" only in the body (no div). So there seems to be no way to fix the background with css.
This is one of the sites i found http:// css-discuss.incutio. com/?page=FixedLayouts , but there are many more.
I would be happy if anyone has a solution for gallery2

 
RwD
RwD's picture

Joined: 2005-01-09
Posts: 383
Posted: Thu, 2005-10-20 06:48

Can you show a code example or show your site? I have never had any trouble getting a backkground where I want it but I cannot guess where exactly you want it...
______________________
I made a theme for G2, try it :)

 
ckawalek

Joined: 2005-01-25
Posts: 104
Posted: Tue, 2006-07-25 04:39

I'm having the same type of problem using a fixed background image. It works great in Firefox, but in explorer it doesn't stay on screen when I scroll. I'm using an edited Color Pack w the code:

#gallery {
color: #888 !important;
background-color: #1B1E1E !important;
background-repeat: no-repeat;
background-position: top center;
background-attachment: fixed;
background-image: url(http://ChristianJamesPhoto.com/images/CJPBG01.jpg);
}

My Site:
http://christianjamesphoto.com/main.php/v/TestCJP/

The same code on my MySpace site where it works correctly in both IE & Firefox:
http://www.myspace.com/concertphotos

Thanks,
Chris

 
ckawalek

Joined: 2005-01-25
Posts: 104
Posted: Tue, 2006-07-25 21:53

Resolved the problem!!!
Ok the background must be in a body tag to remain fixed in IE, so I used this instead:

body {
color: #999 !important;
background-color: #1B1E1E !important;
background-repeat: no-repeat;
background-position: top center;
background-attachment: fixed !important;
background-image: url(http://ChristianJamesPhoto.com/images/CJPBG01.jpg);
}

However in the theme.css file for your theme there is css that overrides it so take out the background color there:

#gallery {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 62.5%;
color: #333;
/* background-color: #fff; */
}