开发者

Background positioning - CSS

Please see attached screenshot

Background positioning - CSS

The background is a bit off in both IE and chrome (although it was working befo开发者_如何学Pythonre? hence the exact numbers??), although in ffox it looked allright..

Here is the code for what I thought was very straight forward... am I missing something?

#wrapper{
    width:100%;
    overflow:hidden;
    position:relative;
    background:url(../images/body-bg.jpg) no-repeat ;
    background-position: -20px top;
}

And an IE fix


    
    #wrapper{ background-position: -21px top; }
    
     

I actually just want it centered - so I'm just going to say "center top"


The combination of numeric values (-21px) and keywords (top) was not allowed in CSS 2.0 and the support is rather unreliable. Try -21px 0px.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜