Skip to content

Instantly share code, notes, and snippets.

@Farmatique
Created January 16, 2017 16:19
Show Gist options
  • Save Farmatique/fd3af973313468462b246d86dd94718c to your computer and use it in GitHub Desktop.
Save Farmatique/fd3af973313468462b246d86dd94718c to your computer and use it in GitHub Desktop.
Right block stretch to remaining width, left block width depending on inner text
<div class="wrapper">
<div class="left">
here is thevery very very big text
</div>
<div class="right">one</div>
</div>
.wrapper{
background-color: green;
width: 100%;
display: flex;
}
.left{
background-color: red;
color: white;
width:auto;
white-space: nowrap;
flex-shrink: 0;
}
.right{
background-color: yellow;
width:100%;
flex-grow: 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment