tags:

views:

132

answers:

5

hi, i got this website here http://www.redlineautoleasing.com/beta/

and the div container contains a background with a grungy look, and the body contains another background that is repeated on the x coordinate.

if you view the site you'll see whitespace on the left and right side. what im wondering is how i can set the background images to expand based on the persons resolution. would it work to set a width based on percentage for each div?

thanks

A: 

I dont see any issues with what you've got in FF3/IE6/IE7 and chrome. only issue i see is the transparent png in ie6 with the ugly gray behind it.

Darko Z
+2  A: 

To my knowledge, CSS does not support scaling background images, which is disappointing to say the least. Long story short, you'll probably have to fake it with a fixed-position, z-indexed img tag. That, or what you did: a large image with a background-repeat.

Luke Dennis
A: 

ie6 I gotta fix but what the customer wants is for the with of the page to size up based on the users computer resolution

A: 

Unfortunately, you can't scale the image itself.

What you could do would be remake the div structure so that the inner div contains the center of the grungy background and the sides were tiled through two separate divs. You could then recut the center piece to tile both vertically and horizontally and give it a width that is a percentage of the window size. You could keep it from getting too small via javascript.

This is not an optimal solution, but if the client is set on having it scale with the browser window, this might accomplish it for them.

tallgreentree
A: 

thanks for all your answers, when i said white space i didnt mean actual white space what i was refering to was that the entire container div wasnt sizing (width wise) towards what the users computer resolution was. and since allot of the divs are set with a background image there is no css code for setting the width on the image but i guess it would work on the divs. but thankfully after talking with the customer he changed his mind and doesnt want it anymore :)