Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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).



Hm. I never get any flexbox output unless I tick "Vertically: top". Perhaps a bug then.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: