CSS Web Design examples: design and make large background pages

Source: Internet
Author: User

Web page Production WEBJX article introduction: how to use CSS to achieve a large background page design.

Since I published a large background page design collection, I received a lot of emails asking how to use CSS to achieve a large background of the Web page design. So I decided to share with you the design techniques of the big background site. In this tutorial, I'll use some examples to illustrate how to design a large background site with one or two pictures.

Mistakes that are often made: backgrounds are cut (see sample)

Look at the sample file, which is no problem when the resolution is less than 1280. But if your display has a resolution greater than 1280 pixels, you will see a portion of the background image.

Example 1: A picture (see sample)

Simple way to fix the problem: set the color of the edge of the picture to the same color as the background of the page. Here I use the web Designer wall as an example, look at the picture below, note that the edge of the picture is solid color.

CSS Section

This section is simple, set the background image for the BODY element (located in Center,top)

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 that there are two extra lines in the body selector to prevent the background image from changing when the browser window is smaller than the content width. (this will appear in Firefox)

[1] [2] Next page



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.