Solved

Extending background image

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

Http://www.markfriedler.com - 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.

Thoughts?
0
Comment
  • 3
  • 3
7 Comments
 
LVL 16

Expert Comment

by:robinu
Comment Utility
You can repeat a background image.

Have a look at http://www.tizag.com/cssT/background.php
or http://www.w3schools.com/css/css_background.asp
for some examples on how to repeat it.
0
 
LVL 10

Expert Comment

by:Kechka
Comment Utility
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.
0
 
LVL 1

Author Comment

by:catonthecouchproductions
Comment Utility
@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
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 16

Expert Comment

by:robinu
Comment Utility
In what direction do you want it to extend? Can you make an example test page where it shows the fault?
0
 
LVL 1

Author Comment

by:catonthecouchproductions
Comment Utility
Below the main content. Like on this page: http://www.markfriedler.com/10tools

The designer of this site, for some odd reason made this site one image: http://www.markfriedler.com/wp-content/themes/classic/images/MF_SITE_V1.1_02.jpg

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

Thanks for your help,
0
 
LVL 16

Accepted Solution

by:
robinu earned 500 total points
Comment Utility
You can try the following:

create a new image from the http://www.markfriedler.com/wp-content/themes/classic/images/MF_SITE_V1.1_02.jpg
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;

		

	PADDING-LEFT: 45px;

	WIDTH: 980px;

	BACKGROUND-POSITION: center top;

	BACKGROUND-IMAGE: url(images/line.jpg); 

	BACKGROUND-REPEAT: repeat-y;

}

Open in new window

0
 
LVL 1

Author Comment

by:catonthecouchproductions
Comment Utility
Thanks or this tip! This has me going in the right direction.

Ryan
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

As a result of several questions about how to use Bootstrap I thought it would be a good idea to write down the development aspect of creating a Bootstrapped website in as little time as possible. Part 1 of this article will only concentrate on g…
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now