Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Cascading Style Sheets _ stretch background image

Posted by: JimiB Apr 9 2017, 08:03 AM

On my home page, the background image in the left content section suited the original template by only going half way down the columb.
Now i need to stretch the bg image down the full left content columb. i have tried changing my css without success.

CODE
#left_content{width:42%;height:auto;margin:10px;float:left;padding:10px;background:url(images/left_content_bg.png) repeat-x top;background-position:0 -18px;}

Posted by: pandy Apr 9 2017, 10:19 AM

You mean stretch or tile? If the latter just remove repeat-x.

Posted by: Christian J Apr 9 2017, 10:25 AM

Do you want the image to both stretch and repeat itself?

You might use the "background-size" property to stretch it, but the result may depend on wether the element's height is known or not.

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)