Since I posted the huge collection of Large Background Websites, I received several email requests on how to make a large background site with CSS. So, I thought it would be a good idea to share my techniques on designing large background websites. In this tutorial, I will provide various CSS examples on how you can create a large background site using either a single or double images.
Common Mistake: Background Gets Cropped (see demo)
Take a look at the demo file, it looks fine under 1280px. But if you have a high resolution display, you will see the background gets cut off on the sides.

Example #1: Single Image (see demo)
A quick solution to fix the problem mentioned earlier: make the edge of the image the same color as the BODY background color. Here, I'm going to use Web Designer Wall as an example. Take a look at the image below and notice the edge is a solid color?

CSS Part
The CSS part is very simple. Specify the background image (position it center, top) for the BODY element.

Here is the CSS code:
body {
padding: 0;
margin: 0;
background: #f8f7e5 url(wdw-bg.jpg) no-repeat center top;
width: 100%;
display: table;
}
Notice there are two extra lines in the BODY selector. That is to prevent the background image from shifting when you resize the browser smaller than the content width (it happens in Firefox).

Example #2: Double Images (see demo)
For this example, I'm going to use the job board design, Design Jobs on the Wall. I have a cork board pattern repeating in the BODY tag and a wrapper background in the center.

The trick here is to export the GIF matte with a brown color that is similar to the cork board pattern.

Example #3: Sky Background (see demo)
In this example, I have a 1px gradient that is repeated horizontally for the BODY tag. Then I attached a cloud background in the center of the #wrapper tag.

Update: Sky Background Using HTML Selector (see demo)
Thanks to the comments from the readers. Below is an example of the sky background using HTML selector to display the gradient background, so the #wrapper DIV tag is not required. It is a much more cleaner approach.

Download the demo zip now and don't forget to check out the Large Background Websites.
Credits: thanks to Alex from markup4u.com for the {width: 100%; display: table} CSS trick.
This is a great website I will recommend it to everybody.. Thank you for the info great help.
Iceman
Keep it coming..
iceman
This is great web design — THANKS!
Nice article showing how simple it is.
Thanks.
Any chance on getting an article on footer layout techniques as well?
cheers
Dave Cutts
This is great and all, but I think it kind of fails to address a larger issue with large background images: How does one go about making one, and how can one ensure that the large image will load quickly?
I personally just use “Save for Web” in Photoshop, and choose the lowest quality of .jpg I can before the image starts losing quality, because I find it loads the quickest. Is there a better way?
Otherwise, phenomenal work here at WDW (and at n-design studio, and of course I love Best Web Gallery)
In the sample files inside demo.zip, the content area continues all the way down until the end of pages. What do you do to end the content are earlier. Do you simply add one more div for the footer under the content div and use the same background colour that you use in the body?
Just another quick question, I’m find it easy to learn CSS and build websites with CSS layout but I can only build static HTML websites. I see that you use wordpress in your sites. Could you write a beginners quide on implementing wordpress into your designs? Where do we start?
Cheers
Erdinç
Tip:
When compressing to .jpg. Firefox will make a jpeg 60% smaller than using Photoshop ‘save for web’ at the same quality.
If you use dreamweaver, just import or drag the psd file to your design and it will let you optimise it using the fireworks optimising enging which is built in to dreamweaver cs3/4 and then ask you where to put the .jpg.
It’s a faster and better way to work.
Great tutorial, but as some guys mentioned over here, you still don’t give a solution for a scalable background image across the entire page, maybe this can help those people: http://webdesign.about.com/od/css3/f/blfaqbgsize.htm
Cheers from Holland,
Dennis
Soooo how do you get the LARGE image to load quickly??
Nice article.
Thanks a lot for your explication.
Example #2 is really amazing… :)
A common technique that I’ve used for some time now, thanks for sharing :)
see this to: http://www.jayaninternational.com
This was the exact project I am working on this weekend. Thank you for help as always ;)
@Markup4U
I was working on that particular file when I was fixing it, overwriting it all the time, so I have no copies of it.
Hi Nick,
Just wondering if my site was the inspiration for Example #3.
http://www.webdesignerbristol.co.uk
Or is it that my site is just the most unoriginal concept ever!
Cheers Geoff Ellis
PS. Love web designer wall and best web gallery
Excellent tutorial. I just used it successfully on my web site: http://www.MyClubTees.com
The two extra lines in body save me.
Thank you!
I’ve always loved this look, but what kind of file size are you creating here? Surely these are pretty heavy images?