×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

How to make backg img fill whole DIV container

How to make backg img fill whole DIV container

How to make backg img fill whole DIV container

(OP)
I need this to work for IE8 though (WinXP).
I have tried this:

CODE --> css

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

Could it be browser related?

Thanks guys!

JDL

RE: How to make backg img fill whole DIV container

(OP)
Btw, it doesn't matter if the image deforms.

RE: How to make backg img fill whole DIV container

(OP)
Bad news.
According to this page: http://www.quirksmode.org/css/background.html#size
IE8 does not handle this atribute :(

Can one get this done with Javascript then? If so what would be the code?

Thanks guys,

JDL

RE: How to make backg img fill whole DIV container

(OP)
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

RE: How to make backg img fill whole DIV container

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close