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

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top