What I want to do is make a tableless page that has a 15px margin at the left and right side and then has a div that fills up the rest (100%). When I try to do this my div causes the page to scroll horizontally because the width:100% becomes 100%+15px and goes off to the right and out of view. The browser then appears to ignore the 15px margin on the right.
Does anyone know how I can have a margin on both sides in pixles and still have a div that takes up the entire area between those 2 margins. I am using % because I have no idea what the viewers resolution will be but I want to use pixels for the margin so it is the same everywhere.
Thanks for the info, I've got everything in a style sheet now, the reason I want to use 100% is because there are very few words in this div and therefor does not take up that much space but it has a colored background that I wanted to extend the entire width of the page minus the margins. In other words I need the div to extend past just foo and instead margin to margin.
Yes, position:[anything] will force a block-level object to act like an inline object. The good news is that block-level elements automatically stack on top of each other. So just place them in their proper order in your markup, and they'll line up right on top of each other