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.
Thanks a lot for an excellent tutorial. This has opened new ideas for me to experiment with. I am not a computer geek but am trying to create my own website using Google sites. Appreciate the trouble you are taking to provide such nice learning venues for the people like me.
With the very best wishes,
dilip
I was looking something like this to clarify my doubts
Thanks!!!
I love your page. Nice Job
FINALLY!! Thanks for this info…after days of struggling this hit the spot!!! You are appreciated. Blessings. You have a beautiful site!
FINALLY!! Thanks for this info…after days of struggling this hit the spot!!! You are appreciated. Blessings. You have a beautiful site!
Awesome tutorial, thanks.
One question. Would it be possible to animate the second bg image? i.e. have multiple images which scroll?
I’ve been working on this with CSS but can’t seem to get it right.
Any suggestions would be appreciated.
Thanks again.
Thanks a million for the great tutorial I have tried to do this for quite some time and nothing has worked like this your awesome for taking the time to share this with us THANK YOU :)
Hi,
Can I use the example you use for a single image layout on my site? I really like it a lot.
Thanks!
great method…thanks for sharing this….
Thanks for sharing, this will help alot for my website. You rock!
Regarding… Update: Sky Background Using HTML Selector (see demo)
Hello, I’m a new designer… I’m a little confuse with the “Sky Background Using HTML Selector”. If you do that wouldn’t then have to do it each and everytime for different page? Wouldn’t the CSS make easier and only have to change once for each page of the whole website? Sorry, my question sounds rudementary but I’m confuse why the HTML is cleaner than the CSS… again I’m a new designer. Thanks!
woow . i use in my web site.
It was very interesting to read.
serve as a reference
Great, thanks! Love your site.
Thanks Dude.This was very helpful.Keep it up :)
The CSS examples are amazing!:)
It’s alright if I sleep in class. This article explains it better.
I can’t get the image to be small enough, they’re all coming up at 300k plus… with loading time for lik 40 seconds… now I know we all have fast connections but I won’t want to get a pentalty of slow website from Google!
This is amazing! Anybody please point me to a tut/s on how to assign a different background image each day of the week? Thanks a lot.
I HATE IT
Another questionnaire, the participants’ problem identification and structuring, idea generation, problem elaboration and clarification, such as creativity, problem solving insertion sezkin idea which one’s preferred styles are evaluated. While participants preferred the style of non-disclosure and intellectual development of ADHD, with ADHD, participants chose to produce ideas.