I am using bootstrap to make a homepage where I have a small header and a sidebar that I constructed. I want the body to be all one height.
I originally had it written with overflow: hidden
, but I do not want to do that as content will be pushed off the page on smaller screens and I want viewers to be able to view them.
Currently, the bottom of the page looks like this: with the light green extending further than the sidebar. I want them to be the same height regardless of the window size. What I have noticed, which seems pretty self-explanatory, is that the light green extends the same amount as the header, but because it is a responsive layout, this amount changes.
I have tried to use display: flex
to no avail, I have tried table layout, I have tried to set the height to specific value and that does not work either.
The HTML:
<div class="container-fluid">
<div class="row" id="headers">
<div class="menu col-xs-3">
<div>
<div class="col-xs-12 menu-item"><a id="about-me-nav">About Me</a></div>
<div class="col-xs-12 menu-item"><a>Portfolio</a></div>
<div class="col-xs-12 menu-item"><a href="./resume.html">Resume</a></div>
<div class="col-xs-12 menu-item"><a>Contact</a></div>
</div>
</div>
<div class="col-xs-9 main">
<h1>Header</h1>
</div>
<div class="col-xs-9 content auto-content-div">
</div>
and the CSS:
body, html {
height: 100%;
width: 100%;
}
#headers, .container-fluid {
height: 100%;
}
.menu {
background: url("http://www.space.com/images/i/000/041/737/original/milky-way-chile-praniski.jpg") no-repeat;
height: 100%;
}
.main {
background-color: #021615;
text-align: center;
}
.menu-item:first-child {
padding-top: 4.5em;
}
.menu-item {
padding-top: 4em;
text-align: center;
}
.content {
height: 100%;
background-color: rgba(12, 122, 86, 0.32) ;
}
PLEASE HELP!