Hacker News new | ask | show | jobs
by RyanGoosling 2228 days ago
You don't need the style="text-align:center" on your wrapper element
1 comments

> You don't need the style="text-align:center" on your wrapper element

Why not? The goal is to center something with an unpredictable size.

display:block adapts to the container. display:table adapts to the contents.

This uses both.

A box isn't text. Why don't you give it a whirl.
Oh, I see. Gotcha. I use it for images and lists, so I've gotten used to it.

Cool. Thanks!