Apparently, styling the default div to this works:
div
{
display: flex;
flex-direction: column;
}
But, this is not something that is practical to have as a default style in real life.
Thus, I am still trying to find a safe way to adjust the style so there won't be any gap.