excuse me if my question will be naive but i'm just learning some basic HTML and CSS from home.
I'm trying to understand how the overflow works. I've read a lot online but still i can't get a firm grip on it...in the specific why should i use
overflow: hidden;
in order to get my div to expand on top and get rid of the white space?
BEFORE: div not expanding properly
AFTER: div expanding on top
Here you can see my code which is almost the same: https://codepen.io/Code_Cafe/pen/EemVRz
My answer has been marked as "answered". The fact is that I've read about collapsing margins but i didn't understand the explanation and most of all, WHY overflow:hidden
is the solution...
Many thanks guys!