I have .left-navbar
and .columns-wrapper
in which are two columns, .left-column
and .right-column
. The first column and second one has 50% of .columns-wrapper
until I add position: fixed
to .right-column
and .right-column
takes 50% of browser width not .columns-wrapper
.
.page-wrapper {
width: 100vw;
height: 100%;
display: flex;
background: red;
}
.page-wrapper .left-navbar {
width: 88px;
height: 100%;
background: yellow;
}
.page-wrapper .columns-wrapper {
width: calc(100% - 88px);
height: 100%;
background: orange;
display: flex;
}
.page-wrapper .columns-wrapper .left-column {
width: 50%;
height: 100%;
background: red;
}
.page-wrapper .columns-wrapper .right-column {
width: 50%;
height: 100%;
background: green;
}
<div class="page-wrapper">
<div class="left-navbar">
</div>
<div class="columns-wrapper">
<div class="left-column"></div>
<div class="right-column"></div>
</div>
</div>