The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Layout horizontal Divs Reply To: Layout horizontal Divs


Here’s a pen with four boxes evenly distributed and responsive.

The key is that the inner div has display:inline-block and its parent with text-align:center. And, nicely responsive.

Narrow and widen your browser to see that the boxes maintain their center alignment.