4 ms·
Can someone explain to me what is this for if selecting 4 x unknown in all questions leads to this? <div style="margin-left:auto;margin-right:auto;"> (DIV) <di
by jakubp 10y ago
Can someone explain to me what is this for if selecting 4 x unknown in all questions leads to this?
<div style="margin-left:auto;margin-right:auto;"> (DIV)
<div style="text-align:center;">Text Content</div> (TEXT)
If this is supposed to work, then by reduction, having more information about height/width is unnecessary for both browser and CSS programmer. Why not just always use those two forms?
- deleted 10y ago[deleted]
- andrewliebchen 10y agoWhat 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).
- deleted 10y ago[deleted]
- jakubp 10y agoHm. I never get any flexbox output unless I tick "Vertically: top". Perhaps a bug then.