Answer the question
In order to leave comments, you need to log in
How to make a div take up the maximum available space?
Actually, a three-column layout, the left column has a fixed width, the middle one has a min-width, the rightmost one has a min-width && max-width.
Is it possible to make it so that if there is enough space, the right one takes its maximum value, and the middle one takes the rest of the place?
Answer the question
In order to leave comments, you need to log in
https://jsfiddle.net/7n2kxfwj/
If you make the text in the right column shorter, then it will take min-width. And with a long text there will be max-width
If you want the right one to occupy max with a short text, you can add flex to it: 1 1 auto;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question