This is the css
body, html {
height: 100%;
width: 100%;
}
#container {
display: flex;
position: absolute;
flex-flow: column wrap;
justify-content: stretch;
align-items: center;
width: 100%;
height: 100%;
text-align: center;
background-color: black;
}
div.sections {
display: flex;
flex-flow: row wrap;
justify-content: left;
align-items: stretch;
margin: 0;
padding: 0;
width: 100%;
color: black;
background-image: linear-gradient(0, orange, gold);
border-top: 2px solid black;
border-bottom: 2px solid black;
}
where #container
is a sibling of div.sections
, both directly under the body tag.
The issue arises as #container
's height exceeds the body due to div.sections
's height.
I am unsure whether this problem is related to the flex property. Although I can resolve it using JavaScript,
I am keen on finding a CSS-based solution.