Extending background image

Posted on 2009-05-10
Last Modified: 2012-05-06
Is there a way to extend the background image if the content goes longer than the image itself?

Http:// - We took over a site where the whole background image is one giant image and now the client wants it to extend longer if needed but we can't get it to work.

Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
LVL 16

Expert Comment

ID: 24352349
You can repeat a background image.

Have a look at
for some examples on how to repeat it.
LVL 10

Expert Comment

ID: 24352655
The easiest way is to put this design as is in table with the width of the backround image, and place table in a center. On your page make background color blue, like in image, and you will have blue background and centered design with this design no mather what resolution user have. Only the blue part left and right will grow.

Author Comment

ID: 24353864
@robinu, I did try that, but I am trying to get it for it ONLY extends if it needs it.

@Kechka, could you give me an example? I am kind of confused.

My goal is to only extend the bg past the main one image if it needs it.

Thank you guys
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 16

Expert Comment

ID: 24354324
In what direction do you want it to extend? Can you make an example test page where it shows the fault?

Author Comment

ID: 24354467
Below the main content. Like on this page:

The designer of this site, for some odd reason made this site one image:

And if the content goes below the main content then repeat.

Thanks for your help,
LVL 16

Accepted Solution

Robin earned 500 total points
ID: 24356368
You can try the following:

create a new image from the
by just using the bottom 13 pixels of it and call it line.jpg in the same directory.

And use that image to extend the page to the bottom.
E.g. change the css #page to the following.

It still doesn't look right, and you lose the paperclip part, but you get the idea.

It would even better if you divide that large background image in the different part:
header, page and paperclip side.

#page {
	margin: 0 auto;
	padding: 10px 0px;
	WIDTH: 980px;
	BACKGROUND-IMAGE: url(images/line.jpg); 

Open in new window


Author Comment

ID: 24361097
Thanks or this tip! This has me going in the right direction.


Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Printing customized headers and footers using html and bootstrap 3 70
SVG and IE11 2 30
Presenting my portfolio on the web? 11 48
Jquery syntax 12 22
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question