I'm trying to create a 2 column layout with flexbox. One is fixed width on the side and the other one (main column) fills the remaining space.
It was working until I put some contents wider than the screen with a overflow-x: scroll
parent. Now this wide content is not limited by its scroller parent.
Here is the sample:
.container {
display: flex;
}
.container .col-main {
background: gold;
flex: 1 1 100%;
}
.container .col-side {
background: cornflowerblue;
flex: 0 0 15em;
}
.slider-container {
overflow-x: scroll;
}
.slider-container .slider {
background: repeating-linear-gradient(45deg, darkseagreen, darkseagreen 10px, dimgray 10px, dimgray 20px);
width: 150em;
height: 10em;
}
<div class="container">
<div class="col-main">
<div class=slider-container>
<div class="slider">
Foo
</div>
</div>
</div>
<div class="col-side">
Side
</div>
</div>