Comment

Comment by andrewliebchen

What you've posted will only center a `<div>` with a known width (ie, for `margin: auto` to center a child element within its parent, the width of the child must also be specified).

Not sure if you're mistaken in your comment or there's a bug in the site. When I select all unknown dimensions and a block-level element, it gives me a flexbox output (the right answer, IMO).

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton