What you&#x27;ve posted will only center a `&lt;div&gt;` 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).<p>Not sure if you&#x27;re mistaken in your comment or there&#x27;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).