Quick Question: Background image stretch

heebiejeebieclu's picture

They have: 527 posts

Joined: Aug 2004

Hi all: just a quick question today.

Say I have a CSS column 100px high and a gradient image 10px high, how do I make it so that the gradient image stretches down the 100px, instead of having the 10px gradient and the bottom 90px blank space?

Thanks,

heebie

They have: 24 posts

Joined: Jun 2007

try to exclude this from external style sheet if you are using external style sheet

and put it in the html file
or try to put it in the header.
if still not working then put it inline.

benj's picture

They have: 36 posts

Joined: Apr 2007

heebiejeebieclu;221097 wrote: Hi all: just a quick question today.

Say I have a CSS column 100px high and a gradient image 10px high, how do I make it so that the gradient image stretches down the 100px, instead of having the 10px gradient and the bottom 90px blank space?

Thanks,

heebie

I don't think you can do that. Besides, the quality would be terrible. Just make the image 100 px.

He has: 629 posts

Joined: May 2007

I believe that Safari is the only browser currently able to resize background images. I suggest using a fade that's as high as you want (as already suggested) and fade it to the background-color of your box. That way, taller boxes should still look good.

Cordially, David
--
delete from internet where user_agent="MSIE" and version < 8;

He has: 629 posts

Joined: May 2007

Oops. Just after I posted, I remembered an article @ A List Apart about doing something like this. I does not look easy, but it may be what you are looking for:

Super Easy Blendy Backgrounds

Cordially, David
--
delete from internet where user_agent="MSIE" and version < 8;

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.