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!

stretch a background image to fit a div

Status
Not open for further replies.

moron3

Technical User
Dec 2, 2008
17
US
how do you stretch a background image to fit a div?



 
You will be able to do this with [tt]background-size[/tt] property in CSS3. However, CSS3 is only a working draft at this stage and has very limited support in browsers.

Without resorting to CSS3, you cannot do it. You will have to absolutely position img element behind the content and stretch that.

[small]Do something about world cancer today: Comprehensive cancer control information at PACT[/small]
 
i see... i've tried a few examples of this i found on the web but it's not working

can you write me an example?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top