views:

98

answers:

3

Hi all

http://disney.pageonewebsolutions.com/

This website background image perfectly fit to his div. I was wondering if anyone can help me to create the site like this.

Appreciate any reply.

A: 

By using <center> on the background image?

Daniel
@Daniel - No, that won't work, and even if it did, `<center>` is a deprecated tag.
webdestroya
+7  A: 

Just take a look at the CSS for the background:

background:url("../images/background.jpg") no-repeat scroll center top #FCC900;

The "center" does the trick: it makes the background always stay in the centre.

edwin
+3  A: 

The background image is applied using the following CSS

body { background: #fcc900 url(../images/background.jpg) no-repeat top center; }

The top and center keywords make sure that the background image is always displayed in the top-center of the screen and image itself was probably created with the container div in mind, leaving the correct dimensions free for the content.

If you still unsure about how to achieve these effects, view the source and try and apply the techniques you find to your own design.

Matt Weldon