html, body {
margin:0;
padding:0;
}
body {
min-height:100vh;
}
* {
box-sizing: border-box;
}
.column1 {
min-height:100vh;
float:left;
width:25%;
padding-right:15px;
background:white;
padding-top: 5%;
position: relative;
}
#column2 {
min-height: 100vh;
width:75%;
float:right;
background: #b1ffab;
padding-top: 5.2%;
padding-left: 25px;
position: relative;
}
<nav id="column1" class="column1">
<h1><a id="dw" href="{{ url_for('home') }}">Denise Wong</a></h1>
<ul id="navigation">
<li><a class="nav-link" href="{{ url_for('home') }}">Home</a></li>
<li><a class="m-t nav-link" href="{{ url_for('music_therapy') }}">Music Therapy</a></li>
<li><a class="nav-link" href=" {{ url_for('about') }}">About Denise</a></li>
<li><a class="nav-link" href="{{ url_for('what_I_can_offer') }}">What I can offer</a></li>
<li><a class="nav-link" href="{{ url_for('updates') }}">Updates</a></li>
<hr id="nav-hr">
<li id="contact-me-link"><a href="{{ url_for('contact') }}">Contact Me</a></li>
</ul>
<!--Settings-->
<div id="settings">
<ul id="font-settings">
<li>Font size</li>
<li><button>Standard</button></li>
<li><button>Big</button></li>
</ul>
<ul id="brightness-settings">
<li>Brightness</li>
<li><button>Dark</button></li>
<li><button>Light</button></li>
</ul>
<ul id="language-settings">
<li>Language</li>
<li><button>English</button></li>
<li><button>香港</button></li>
</ul>
</div>
</nav>
<div id="column2">
<div id="column2-content">
Hello, this content box/column needs to be full height of page
</div>
</div>
I am trying to make a portfolio website that has 2 main columns: 1 for navigation and 1 for content. I'd like the background of column 2 (content) to always be the full height of the page.
However, when column1's content is longer (goes further down the page) than column2's content then column2s background only seems to be cover 100% height of the top part of the visible page, i.e. if I scroll down then the background ends.
Perhaps a couple of screenshots will help to explain.
Desired behaviour:
What happens when column1's content is longer than column2's:
Notice the white space below the green? That should be green too like in the first screenshot.
Am using the following CSS to achieve this:
body {
min-height:100vh;
}
.column1 {
min-height:100vh;
float:left;
width:25%;
padding-right:15px;
background:white;
padding-top: 5%;
position: relative;
}
#column2 {
min-height: 100vh;
width:75%;
float:right;
background: #b1ffab;
padding-top: 5.2%;
padding-left: 25px;
position: relative;
}
Have been stuck on this for hours and am trying to finish this website for a friend. Any suggestions would be appreciated.