brianbam — 2012-08-03T02:30:35-04:00 — #1
So I have a background image and the code for it is
The problem is that the image is wider than my screen the image is starting on the left portion of the screen verses cutting off the left portion and centering the background. Is that even possible? The reason I want it to cut some off on smaller monitors is that the image does not repeat well in the x-axis direction.
markbrown4 — 2012-08-03T05:28:23-04:00 — #2
background: transparent url(image/Bingham%20Dental%20body%20background%20image.jpg) 50% 0 no-repeat;
background-position is what you're looking for.
In the background shorthand syntax the x position is first, y position section after the image url.
picnet — 2012-08-03T08:44:18-04:00 — #3
Just to add on to what markbrown4 said, you can also use the shorthand: