Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to make backg img fill whole DIV container

Status
Not open for further replies.

javierdlm001

Technical User
Jun 28, 2008
264
0
0
CA
I need this to work for IE8 though (WinXP).
I have tried this:

CSS:
div
{
background:url(image location) no-repeat;background-size:200% 200px;
}
Not working.

Could it be browser related?

Thanks guys!

JDL
 
Chris, I wanted to use a photo as a background of a DIV. But instead of repeating it I wanted it to stretch to fill the DIV, even if some deforming would happen. Unfortunately IE8 doesn't support "background-size" :(

Darryn, thanks a bunch for the suggestion. Unfortunately I'm doing this in a very restricted work environment. But it's good to know though.

I guess I'll just have to go with a pattern instead of a photo, and make it repeat.

JDL
 
As it is for a browser that is dying off somewhat quicker than it's older siblings did, why not simply position it center center and set a suitable background colour using conditional comments for IE8.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top