Center Multiple DIVs with CSS
# Linked to 11 May 2010, 01:43 in Tutorials by Sam Brown
At some point, you may have a situation where you want to center multiple elements (maybe
<div>elements, or other block elements) on a single line in a fixed-width area. Centering a single element in a fixed area is easy. Just addmargin: autoand a fixed width to the element you want to center, and the margins will force the element to center.
There really should be a similar simple way to center multiple elements evenly spaced.
Tweet Subscribe to the RSS Feed →