开发者

Background positioning - CSS

开发者 https://www.devze.com 2022-12-28 01:24 出处:网络
Please see attached screenshot 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.

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

精彩评论

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