3 ms·
Here’s a method with an unknown height... http://zerosixthree.se/vertical-align-anything-with-just-3-lines-of-css/ http://zerosixthree.se/vertical-align-anythi
by 8ig8 9y ago
Here’s a method with an unknown height...
http://zerosixthree.se/vertical-align-anything-with-just-3-lines-of-css/ http://zerosixthree.se/vertical-align-anything-with-just-3-l...
- oneeyedpigeon 9y agoThe flexbox method does work with an unknown height. The point is that the container has to actually have a height (one way or another) that is greater than the height of the aligned element, otherwise vertical alignment is all equal anyway! This is as true of the flexbox approach as it is in your example (which explicitly sets the containing 'section' element's height).