Question:
Code
You can play and see the result here: https://jsfiddle.net/y1jkw3nu/5/
Problem
I have this weird empty space above the red square.
Question
Can someone explain to me where does this empty space come from? I understand that it’s because of
font-size: 50px
, but the .inner
div have vertical-align: middle
. Doesn’t it mean it should be positioned in the middle of the line?Answer:
Thats because the ‘content’ inside reserves height for the text that could be there… put line-height:0 and its gone..If you have better answer, please add a comment about this, thank you!