On 08/09/2016 01:54 PM, Oriol Bugzilla wrote: >> Intuitively, this would center a box in its containing element and also cause it to take the width of its contained text > > > A CSS WG member would probably explain it better, but floats do more than alignment and shrink-to-fit. > > They are also out-of-flow and have some behaviors which might not be obvious how should generalize in |float:center| or other > arbitrary positions. > > > If you only want centering and shrink-to-fit, you can use > > |margin: 0 auto; /* Center horizontally */ width: fit-content; /* shrink-to-fit */| > > The latter may need vendor prefixes. > > Other possibilities are |display:inline-block|, CSS tables, flexbox, etc. And soon, 'justify-content: center'. :) ~fantasaiReceived on Tuesday, 9 August 2016 22:41:58 UTC
This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:15:00 UTC