08-19-2009, 06:05 PM
|
#6 (permalink)
|
|
The Wanderer
Join Date: Aug 2009
Posts: 17
Thanks: 0
|
It should be:
Code:
#ImgHolder {
width: 840px;
height: 250px;
background: url(images/image1.jpg) no-repeat 50% 50%;
padding: 29px 0 0;
margin: 0 0 40px 0;
}
Now I don't know what your paddings and margins do but the 50% 50% is what puts it in the center of the 'box'.
You can try it here on W3CSchools by changing the background-position values and clicking the 'Edit and Click Me >>' button to see the changes.
|
|
|
|