Results 1 to 5 of 5
Feb 8, 2012, 09:49 #1
Is it possible to set the contents of a div to a fixed width with the div at 100%?
I have a div in which I want the background image to be repeated across the width of the viewport, but I want the content of the div to be fixed at 977 pixels, centered in the div. I don't think this is possible, but just wanted to pose the question here in case their is a novel css method or trick I have not considered.
So, the div would have no intrinsic width assigned (or 100%), the content should be 977 pixels and the padding, left and right should be auto.
What I'm trying to achieve is have a repeated background image that spreads across the entire width of the viewport, and a second attached image (the logo graphic), which is aligned to the left of the fixed 977 pixel main container.