CSS/HTML centering of several side by side divs

crazy_guy007

New Member
I'm creating a website which needs several blocks of texts and picture placed next to eachother. But I also want them to be centered. I'm using a set size for each of these elements so if someone resizes their screen I want my page to keep changing the number of divs placed next to each other. Normally I would use float:left; for this but that's not going to work as I want my page to be centered to the middle. so it would look a bit like this:\[code\]________|1 2 3 4| | 5 6 ||_______|\[/code\]but when I resize the screen it would look like this:\[code\]______|1 2 3||4 5 6||_____| \[/code\]and if I size up it would look like this:\[code\]___________|1 2 3 4 5 || 6 ||__________|\[/code\]currently the css looks like this:\[code\] div.child{width:23%;float:left;height:600px;padding:0px;min-width:200px;max-width:230px;overflow:hidden;text-align:center;border-style:solid;border-width:5px;overflow:visible;display:inline-block;}\[/code\]and \[code\]div.parrent{padding:0px;border-style:solid;border-top-style:solid;border-width:5px;overflow:hidden;text-align:center;\[/code\]}Anyone got any tips?
 
Back
Top