I want my .sideBar
and .contentHolder
elements inside of .displayContainer
.
The problem is .displayContainer
is rendering an unnecessary vertical scroll bar. Horizontal scroll bar is okay, but there is no need for a vertical scroll bar.
I have inspected and found that the .displayContainer
and the child elements have the same computed height. So then why is there a vertical scroll bar?
Can anyone give me an idea how to remove it?
body, html {
margin: 0px;
padding: 0px;
border: 0px;
height: 100%;
width: 100%;
}
.displayContainer {
height: 100%;
width: 100%;
overflow: auto;
white-space: nowrap;
}
.sideBar {
background-color: green;
display: inline-block;
width: 20%;
height: 100%;
}
.contentHolder {
background-color: red;
display: inline-block;
width: 100%;
height: 100%;
}
<div class="displayContainer">
<div class="sideBar"></div>
<div class="contentHolder"></div>
</div>