CSS grid padding

Soldato
Joined
27 Dec 2005
Posts
17,316
Location
Bristol
I think I'm having a blonde moment here. I'm putting together a website from scratch based on a standard grid system with the following options:

[1column]
[2column] [2column]
[3column] [3column] [3column]

What is the neatest way of having the fewest css classes whilst allowing for padding? For any segments, ie 2column and 3column, how can you neatly specify say a padding of 20px in between each, whilst keeping the edges flush? Does that make sense?

Previously I've used a spacer div but at the moment that doesn't feel like it'd be the neatest way.
 
Thanks folks. In the meantime I decided to do what 960 effectively does, and that's every column has the same left and right margin so the 'wrapper' as it were contains the excess spacing on the far left and right.

So difficult to word that!

WIP anyway: www.novelphotography.co.uk/beta
 
Last edited:
Back
Top Bottom