Skip to main content
Inspiring
October 16, 2014
Question

Is there a way to stretch a background image rather than repeating it?

  • October 16, 2014
  • 1 reply
  • 650 views

I have a one celled table with a background image.  It's really just a gradient strip (gradient going from top to bottom - ending in fade to white).  I want the image to continue all the way across the page.  If I set it to repeat via X, somehow you can see where the repeat begins... so I was wondering if there's a way to just stretch the image from left to right to force it to fit exactly to 98% of the window no matter how big the window is.

Thanks...

kb

(RH10 for Webhelp)

This topic has been closed for replies.

1 reply

RoboColum_n_
Legend
October 16, 2014

Unfortunately there is no way to automatically stretch an image in HTML. An image is of a set size. You could manually stretch the image size in each table, but you'd be in danger of losing resolution. An alternative to stretching the image could be to make the background image to the size of your largest table, and change the colour gradient so that it fades to white before the size of your shallowist table. Hope this makes sense.

ktbFLAuthor
Inspiring
October 16, 2014

yep... totally makes sense... THANKS!

On Thu, Oct 16, 2014 at 9:40 AM, RoboColum(n) <forums_noreply@adobe.com>

Willam van Weelden
Inspiring
October 22, 2014

That's not entirely true. With CSS, you can stretch a background image to any dimension:

background-size: 10px 100%;

Also see: CSS3 background-size property

Kind regards,

Willam