background-attachment
Hello,
I'm designing a new portfolio site for myself. The basic design is almost done. That is, almost, as IE refuses to give me what I want
The CSS has a body element definition, that says:
body{
background: transparent url(ui-img/noise.gif) bottom left repeat-x;
background-attachment:fixed;
margin:0px;
}
As you can see, I have a fixed background image on the bottom. I know there are some troubles using background-attachment:fixed in IE ,but not when you use it in the body element.
But in this particular case, IE refuses to 'fix' my background image on the bottom. It only appears when you scroll down to the very bottom of the page. It's the gray noizy gradient bar.
Did I miss something? Can someone tell?
This is the url. Be sure to open it in IE as well as another browser like FF or Opera and check the difference.
Anyone?
Thanx in advance
Shakespeare: onclick || !(onclick)
Megan posted this at 13:53 — 10th August 2006.
She has: 11,421 posts
Joined: Jun 1999
Nice looking site
I'm doing some testing and it seems that it won't do a fixed background on the HTML element and the body element at the same time. If you take out the HTML call it works. So, it looks like you'll have to choose between the top one and the bottom one for IE.
Megan
Connect with us on Facebook!
Jack Michaelson posted this at 15:38 — 10th August 2006.
He has: 1,733 posts
Joined: Dec 1999
Ah, thanx Megan. Still giving usefull replies
Seems indeed that I'll have to choose between top or bottom for IE.
I think I'll choose 'top'.
Or maybe trying to come up with something else? hmmm...
I'll keep you updated
Thanx!
Shakespeare: onclick || !(onclick)
demonhale posted this at 02:16 — 11th August 2006.
He has: 3,278 posts
Joined: May 2005
why not for the top part use a regular div, then the rest of the body div you use a higher z-index to move the top div one layer below. And use the regular css BG for the bottom..
Jack Michaelson posted this at 08:28 — 11th August 2006.
He has: 1,733 posts
Joined: Dec 1999
That's a possibility that might work, but I'm not sure if the top bar can be 'fixed' that way. IE7- doesn't support fixed elements consistently. Have to try it out this weekend, I'm at work now
Thanx
Shakespeare: onclick || !(onclick)
demonhale posted this at 04:04 — 12th August 2006.
He has: 3,278 posts
Joined: May 2005
you can try and put on the top part div a margin-left: 0px and a margin-top:0px and position it absolutely so that it stays on top of the edge of the browser window while the rest of the body container overlaps as positioned absolutely with a negative margin-top to its main container and a higher z-index...
Jack Michaelson posted this at 19:36 — 13th August 2006.
He has: 1,733 posts
Joined: Dec 1999
Thanx for digging into this. Unfortunately that won't make the background fixed when scrolled. No offense, but I think you misunderstood me or I misunderstand you (some punctuation perhaps?)
Shakespeare: onclick || !(onclick)
demonhale posted this at 02:34 — 14th August 2006.
He has: 3,278 posts
Joined: May 2005
Its hard to articulate but what your trying to do is fairly difficult to achieve. Ill try to outline it in a little more basic way, The two possible solutions would be:
1. use javascript to position one element to position absolutely.
and 2. the one I suggested which will also wouldnt be the best solution but could give you an idea.
The main content part would be floated(z-index and percentage)margins and would have to use an overflow control. That way it floats along the page and the header is fixed via the body background control and the bottom part a regular div positioned to fit at the bottom.
The keyword here is that the main content part would have to use overflow, in retrospect heres an example consider the content part the one on the left that sticks to the bottom, and the maintext and logo is the fixed body background. Thats what im suggesting... heres a previous splash screen of my site that uses this. http://www.demonhale.com/sample.html
Jack Michaelson posted this at 05:19 — 14th August 2006.
He has: 1,733 posts
Joined: Dec 1999
Ah, I understand now and I like the idea.
I'll have to dig into that, hopefully tonight.
Thanx
Jack Michaelson posted this at 19:44 — 14th August 2006.
He has: 1,733 posts
Joined: Dec 1999
I tried for a bit, but have no time left. I'll keep you updated
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.