Forum Moderators: not2easy

Message Too Old, No Replies

Backgrounds in Scrollboxes... FF vs. IE

Can't get them to work in both browsers simultaneously!

         

thedevilmyself

10:17 am on May 23, 2005 (gmt 0)

10+ Year Member



Ok, I'm not expeting this to get fixed, but here goes nothing. I have two scroll boxes i wish to have individual backgrounds for, that will be fixed, as in unmoving, so that when you scroll down, the image stays put. Now, i can do this so that it works in FireFox, but it won't work in IE. I can also do it so it works in IE but not in FireFox.

Does anybody know a happy medium?

Here's my relevant stylesheet:

<style type="text/css">
.fish { background-image:url(/vf/table_12.gif);
background-attachment:fixed;
background-repeat: no-repeat;
}
</style>
<style type="text/css">
.flop { background-image:url(/vf/table_16.gif);
background-attachment:fixed;
background-repeat: no-repeat;
}

and here's the HTML for the scroll boxes:

<div class="fish" style="overflow:auto;width:554;height:266; background-color:transparent; border: 0px;">

text text text

</div>

and

<div class="flop" style="overflow:auto;width:213;height:184; background-color:transparent; border: 0px;">

text text text

</div>

Now if "fixed" is "float" it works in firefox but not IE. As it is it works in IE but not in FireFox.

Thanks for any and all help anyone is willing or able to give, because this thing is killing my head!

D

<Sorry, no personal URLs.
See Terms of Service [webmasterworld.com]>

[edited by: tedster at 4:00 pm (utc) on May 23, 2005]

konkrete

10:51 am on May 23, 2005 (gmt 0)

10+ Year Member



Why not create a div with the background image and then put the scrolling div inside that div.

eg:

<div id="containg_div_with_bg">
<div id="scrolling_div_with_transparent_bg">
<!--content-->
</div>
</div>

this is untested but should work.
konkrete

thedevilmyself

7:30 pm on May 23, 2005 (gmt 0)

10+ Year Member



It worked - thanks a bunch, that was such a pain ... i've been doing so much coding lately my brain's just completely fried on it. I need to get out or something.

D

[edited by: tedster at 9:04 pm (utc) on May 23, 2005]