HTML/CSS - Mysterious Top Padding that doesn't go away
Jan 18, 2016
HTML/CSS - Mysterious Top Padding that doesn’t go away
I am making a column layout with CSS, and it is coming along swimmingly. Surprisingly enough my question is not about how to make the columns work; That is functioning. But I am instead getting an eerie mysterious “padding” at the top of my columns that is pushing down content. I have prepared an example here :
I’m really not certain what is causing it. The second column just gets outright pushed down a bit, and then the third one gets pushed down as well, regardless of the rules I specify.
Given that #right is a table-cell element, you could add vertical-align:top to it in order to solve this. For what it’s worth, this wasn’t padding, it’s just the way these elements are rendered as the default behavior is to align to the default value baseline.