How to stretch the background image to fill

A

AAaron123

I have a pretty simple background image. Just a gradient using two colors.

I like to uses a small image and have the browser stretch it.

Is that possible. I did find the "repeat" but can not find a "stretch"

Is there one?


Thanks
 
J

Joern Schou-Rode

Is that possible. I did find the "repeat" but can not find a "stretch"

CSS does not specify any measures to control the size/strething of
background images. However, you are able to stretch regular images (img
elements), and by playing with the display and z-index attributes you are
able to "fake" a stretched background image.

Example code: http://gist.github.com/21707
 
A

AAaron123

That works


thanks

Joern Schou-Rode said:
CSS does not specify any measures to control the size/strething of
background images. However, you are able to stretch regular images (img
elements), and by playing with the display and z-index attributes you are
able to "fake" a stretched background image.

Example code: http://gist.github.com/21707
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,040
Latest member
papereejit

Latest Threads

Top