[FONT=Verdana]They won’t align in the middle because you’ve floated them to the left.
Because you’ve gone for a fixed width, this is an easy one to solve. Each of the inner boxes is 25% of 800 = 200px
So the three boxes plus the margin’s you’ve already given them are 3×(200+15+15) = 690px
To centre the three boxes, we need to shift them to the right by (800–690) ÷ 2 = 55px
You can do this by adding the line[/FONT]
.boxes:first-child {margin-left:70px;}
That moves the first box an extra 55px (70px minus the 15px margin you’ve already given it) to the right, so they will then all line up nicely in the middle.
I read an A List Apart article about that - it wasn’t really an informative article, just a common sense article. But, as they say, common sense just isn’t that common.
To do that, you’ll have to take the margin that you want (70px) and divide it by whatever is wrapping it (200px).
as far as your OP you coudl try this for fluid grid centering: It wont be PX (no % grid will EVER BE as rounding error sare always present and vary by browser. But if your GD is adapted to this… the following code should work fine.
Thanks guys for all your ideas and help with this. I have decided to opt for a different method to allow me to use media queries. I will keep all of your ideas and suggestions in mind for future work though. Thanks again, your responses are very much appreciated