3 ms·
you can do (real) vertical-centering with display: inline-block too See https://twitter.com/giuseppegurgone/status/388203492365451264 https://twitter.com/giuse
by ggurgone 13y ago
you can do (real) vertical-centering with display: inline-block too
See https://twitter.com/giuseppegurgone/status/388203492365451264 https://twitter.com/giuseppegurgone/status/38820349236545126...
- gmjoe 13y agoVery interesting, I never saw that before! But I can't figure out, for the life of me, why the bizarre ".container:before" declaration is needed -- it would seem to be entirely superfluous, but if you remove it, the whole thing breaks. Can you explain what's going on?
- ggurgone 13y agoHere is a visual explaination: http://dabblet.com/gist/7359467 http://dabblet.com/gist/7359467 The pseudo-element (in red) is 100% tall and both .container:before and content are inline-block with vertical-align: middle;