JSFiddle - React, Tailwind, and code Playground
2 divs with ellipisis
by 6233114
HTML
<div class="container">
<div class="not_important1">
employer employer employer employer employer employer employer employer employer employer employer employer employer employer employer employer employer employer employer employer employer
</div>
<div class="not_important2">
url url url url url url url url url url url url url url url url url url url url url url url url url
</div>
</div>
CSS
.container {
display: -webkit-flex;
}
.container>div:first-child{
white-space: nowrap;
-webkit-order: 1;
-webkit-flex: 1;
background: aqua;
-webkit-flex: 0 1 auto; /*important*/
text-overflow: ellipsis;
overflow: hidden;
width: auto;
}
.container > div:last-child {
white-space: nowrap;
-webkit-flex: 1;
-webkit-order: 2;
background: yellow;
-webkit-flex: 1 0 auto; /*important*/
text-overflow: ellipsis;
overflow: hidden;
width: 150px;
}
.container > div:first-child:hover{
white-space:normal;
}
.container > div:last-child:hover{
white-space:normal;
}