Background help

I love the site, by the way. It is amazingly useful.

One thing. I know about CSS and backgrounds, but I seem to be not able to figure out something.

I use i-frames for my site as a links page. I have a background image in the i-frame that makes it look better. However, I’ve been having trouble with size.

I don’t want the image to repeat. I just want the image to stretch to fill the whole i-frame. I tried making the i-frame have the same dimensions as the image, but the problem is that it doesn’t look the same in all browsers. So I’m gonna try css, but I just need to know how.

Thanks so much.:slight_smile:


PS: I already know how to get it to not repeat. but is there a place where you can put size to be 100%, so it’s dependant on the i-frame’s size?

There is a way you can go about it though, it requires a bit of extra HTML but it’ll do the job:

Ensure all of your HTML content is held within a container DIV that has a z-index of 9 or something (pushing it above everything else) and absolutely position it to the top left hand side, then add an image to your HTML page (outside of the DIV) and use CSS to absolutely position it, give top and left and value of 0 and make it span 100% in both width and height (so it covers the whole screen and will scale as the window is resized). How it works is the IMG will scale to the size of the window and the content of the site (which uses z-index to layer it over the image) will work as normal… a bit of a cheat, but it will give you the effect you want. :slight_smile:

This site showcases the effect:

short answer, it’s not really possible, at least not until CSS 3 is fully implemented in all browsers.

long answer, don’t use iframes.