Background positioning - CSS
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..
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
.
精彩评论