Dynadot โ€” .com Registration $8.99

Scrolling Div with Browsers

Spaceship Spaceship
Watch
Impact
0
Hi,
I am making a website and I am making a scrollable DIV tag. I need the background to stay fixed but having problems with different Browsers. If I make the background-attachment: fixed then firefox and others don't have a background. If I make the background-attachment: scroll, IE and FireFox have a backgound but in IE it scrolls.

Code:
<div class="bluecell" style="height:71px; width:221px; overflow:auto;>

in the CSS file...

.bluecell{background-image: url(images/index_13.jpg); background-attachment: scroll; background-position: left top; }

Help Please,
Peter
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
A fixed background image is placed in relation to the browser canvas (viewport). You can put a fixed background in a div, but only when the div is in the same place as the background image you will be able to see it.

You can see an example of this effect here: http://www.estorm.com.au/gallery/jokertest/index.htm
Scroll down the page to see the outcome.

Internet Explorer again ignores CSS1 recommendations and incorrectly treats any containing block as the canvas. Therefore, when the div changes position so does its background image. A fixed background image should always be fixed to the background of the page, not the containing block.

Just so you know, IE is the only browser that ignores this rule.

The CSS1 Specs: http://www.w3.org/TR/CSS1#background-attachment

As for your problem, I don't know of any workarounds for IE. I hope this post helps though.
 
0
•••
has anyone else thought of a way to solve this?
Thanx
 
0
•••
Appraise.net
Unstoppable Domains
Domain Recover
DomainEasy โ€” Live Options
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back