I am trying to make the background colour of my container fill the whole page, and still have the container with my text and photos be centered in the page. When I changed the width to 100% the colour filled the page. <div id=container "width: 100%"> Inside that div I made a div container2 with all my data. It is currently at the left side of the page, but I would like it to stay in the center. Is there a class or style that I can apply to this div to do this? I am not a web designer and I'm only doing this on a family business website, so please be kind. Thank you
Simplest way? Put your background color on the body element. body { background-color: #eee; margin: 0; } Code (markup): We zero the body's margin to kill the 8px default margin on body. For the container element, set a proportional width with a maximum. #container { margin: 0 auto; max-width: 48em; /*this is reasonable for a two column page; just don't let it get too wide to comfortably read*/ width: 95%; /*gives a minimum spacing on either side of the content block*/ } Code (markup): gary
Send me the link of your page I can help you with that. (to have a better idea of what you are trying to achieve)