As you can see, a flex box does not break into two part but just display the blue part. If you uncomment the overflow: hidden
it works as intended.
Why?
The .nav
content is over the width.
.cont {
width: 200px;
height: 300px;
background-color: red;
display: flex;
}
.aside {
width: 50px;
height: 100%;
background-color: green;
}
.nav {
/*overflow: hidden;*/
flex: 1;
background-color: blue;
}
.info {
max-width: 70%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
word-wrap: normal;
}
.name {}
<div class="cont">
<div class="aside"></div>
<div class="nav">
<div class="info">
<span class="name"> tes te s dnaosdjw d adondnasjdoqnsnda djj</span>
</div>
</div>
</div>