This is my code:
body,
html {
height: 100%;
color: white;
}
.wrapper {
height: 100%;
}
.wrap-content1 {
background-image: url(https://source.unsplash.com/random/600x600);
min-height: 100%;
}
.wrap-content2 {
min-height: 100px;
background-color: green;
}
.footer {
background-color: blue;
text-align: right;
}
<div class="wrapper">
<div class="wrap-content1">
Wrapper Content 1
</div>
<div class="wrap-content2">
Wrapper Content 2
</div>
</div>
<div class="footer">
This is a footer
</div>
I want to display the footer div at the bottom of the wrapper div which has a height of 100%.
I know this can be achieved by placing the footer div inside of the wrapper div, but it doesn't meet my requirements.
I suppose you want the
wrap-content1
to be full height so usevh
unit and you will avoid all theheight:100%
and thus no more overflow issue: