|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Scaleable Background
Hi All!!
I'm trying to find a way to set a background image to scale to fill the full size of the page at all resolutions. I found one solution at http://www.webreference.com/dhtml/diner/bgresize/ and have implemented it on http://www.socallandcruisers.com/main.htm It works great with one problem. It seems to only work well in IE6. Is there another solution that anybody is aware of which will work in IE5, and hopefully Netscape? |
|
#2
|
||||
|
||||
|
well, I've heard of different ways, but I've never used any. The problem with the approach of having one image resize for different resolutions is that the image will either be too small and at higher resolutions will look bad(pixelated). OR..
The image in order to compensate for the above problem will be huge. Thus taking a long time to download and effectively losing your audience. In anycase, a suggestion is to use a div and set it's width to 100% and height to 100%. Also make this div have a z-index of 0, everything else z-index greater than 0...ie 4. Now add your image into that div and set the image width and height to 100%. Now the div will grow and shrink, and so will the image. I tested it on IE6 and mozilla and it worked as expected. Sorry, forgot about NN and I don't have Ie5.x. But you can test it ![]() Alternatively, you could probably even just use the image withuot a div. Just give the image a z-index of 0 and everything else higher. p.s You will also need to set the html and body elements widths and heights to 100%.
__________________
Alberta Custom Website Designs Websites for small businesses Support Forums and Freeware Tools Weekly Web News, PC News, HardWare News etc.. |
![]() |
| Viewing: Dev Shed Forums > Web Design > Web Design Help > Scaleable Background |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|