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

Home Forums Design CSS Centre and Left align Reply To: CSS Centre and Left align


Beverlyh, look at this screenshot, you may understand what I’m explaining:

As you can see, the green box is full-width even though there is a massive gap on its right, it’s no longer wrapping around it’s contents, but behaving like a block element.

What I want is this: (edited image)

See how the green box is centred, but it’s contents is left-aligned. This works because the box is wrapping it’s contents, but in my jsbin example the box is just taking the full width, maxing the centre align useless.