I've tried all sorts of combinations of margin : 0 auto, display, width etc and I can't get my container to centralise on the screen. I'm in the 'fiddle around until it works' stage but I've run out of ideas.
I have a container (a div), which contains 6 divs (could increase later), which each contain a pie-chart. I want the charts to align centrally and space themselves depending on how they can fit onto the screen. For example, if there's room for 3 wide, I'd want them 3 wide by 2 deep, but centralised horizontally. If there's only room for 1, then 1 wide by 6 deep, but still the one centralised horizontally.
They are sorting themselves correctly, e.g 3 x 2 or 2 x 3, but they're pushed up against the left edge and I can't work out how to centralise them.
My CSS (which doesn't work) at the mo is :
#container {
margin : 0 auto;
display : inline-block;
}
#chart {
float : left;
}