Created
October 13, 2016 22:46
-
-
Save chestozo/18e3c1eeb032fe1185d254cd5cca106b to your computer and use it in GitHub Desktop.
This file contains 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
/** | |
* Задача | |
* - container резиновый | |
* - внутри 2 колонки | |
* - левая - резиновая | |
* - при этой левая не тянется больше, чем позволяет контейнер | |
* - правая - фиксированной ширины | |
* | |
* HTML | |
* <div class="parent"> | |
* <div class="left">left normal</div> | |
* <div class="right">right normal</div> | |
* </div> | |
*/ | |
.parent { | |
width: 500px; | |
display: flex; | |
} | |
.left { | |
flex-grow: 1; | |
overflow-y: hidden; | |
text-overflow: ellipsis; | |
} | |
.right { | |
/* | |
* Пробовал ещё flex-basis + flex-shrink = не работало | |
*/ | |
width: 200px; | |
flex-shrink: 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment