CSS center display inline block?

Try this. I added text-align: center to body and display:inline-block to wrap, and then removed your display: table.

Try this. I added text-align: center to body and display:inline-block to wrap, and then removed your display: table body { background: #bbb; text-align: center; } . Wrap { background: #aaa; margin: 0 auto; display: inline-block; overflow: hidden; }.

If you have a with text-align:center;, then any text inside it will be centered with respect to the width of that container element. Inline-block elements are treated as text for this purpose, so they will also be centered.

Thanks! Voted up. – Jens Törnell Feb 13 at 6:41.

I just changed 2 parameters: . Wrap { display: block; width:661px; } Live Demo.

Setting a fixed with is not an option for me. Found another solution. Thanks anyway.

– Jens Törnell Feb 13 at 6:41.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions