开发者

Centering my Title DIV

ht开发者_开发百科tp://we-live.in/the_sierra - Towards the bottom of the page I have a div which contains an image of grass. How can I get the grass image to be centered horizontally on the page?

ok i got it centered now i need to move it lower down on the page

thanks


In your CSS, add the following

background-position:center top;

to the following:

#title{
  width:940;
  height:145px;
  display:block;
  background-image:url(images/header.jpg)
}

Additionally, you can also add the following

margin:auto;

But that may not be necessary if you are simply wanting the background image (the grass image) to be centered.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜