I'm trying to use flex layout to create a web IDE that looks like vscode.
The layout looks like this:
But if I have something very long inside of content
area, the view will look like this:
I want to constraint the content
and others
area not exceed browser's right boundary.
Here is the sample code:
.wrapper,
html,
body {
height: 100%;
margin: 0;
}
.wrapper {
display: flex;
flex-direction: row;
}
#row1 {
background-color: red;
flex: 0 0 50px;
}
#row2 {
flex: 0 0 200px;
background-color: blue;
}
#row3 {
background-color: green;
flex: 1;
display: flex;
flex-flow: column nowrap;
display: flex;
}
#col1 {
background-color: grey;
flex: 1;
}
#col2 {
background-color: rgb(40, 40, 40);
flex: 0.5;
}
<div class="wrapper">
<div id="row1">
activitybar
</div>
<div id="row2">
sidebar
</div>
<div id="row3">
<div id="col1">
content
<pre>
TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST
</pre>
</div>
<div id="col2">others</div>
</div>
</div>
<br>
<!-- I want view like this -->
<div class="wrapper">
<div id="row1">
activitybar
</div>
<div id="row2">
sidebar
</div>
<div id="row3">
<div id="col1">
content
</div>
<div id="col2">others</div>
</div>