Created
January 16, 2017 16:19
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <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