Forum Moderators: open

Message Too Old, No Replies

Iframe Question ¦ Background

         

madcat

8:10 pm on Oct 21, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi:

I have 3 divs on index.html. One div the header, one the menu and one content. Each div is part of a larger background image.

The site text will be contained within the content div within an iframe. Now the background image is contained within the index.html div, not content.html (the iframe). Is there anyway to make that iframe transparent so that the image stays fixed, and the text scrolls?

Any help is appreciated!

M

tedster

11:13 pm on Oct 21, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No, I don't think so -- but you can use the css background-attachment property (use it in the iframed document's css) and set it to fixed:

body {background-image:url('something.gif');background-attachment:fixed;}

This creates a background image that does NOT scroll, so you might be able to carefully match it to the parent page's background.

madcat

12:05 pm on Oct 22, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ok, thx. I simply made the background image fixed and it worked in IE6...? I didn't think that IE6 had that capability. I was expecting to use a workaround from TagSoup. Is it just IE 5, 5.5 that don't support it?

tedster

5:48 pm on Oct 22, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I believe that IE's legacy support issues are for using background-attachment on elements other than <body>.