CSS for dynamically placing HTML with unfixed columns?

I want to set such a layout so that both columns are dynamic: one of them is set second in the first column and the minimum width. I found many solutions where the column is fixed with width, but it does not solve this problem.

See what I want to achieve on the screen.

enter image description here

What CSS should I use?

+1
source share
2 answers

There are different approaches to such things ... a simple way would be to use display: table; for container display: table-cell; for childs and width: 1px; for the first child.

I made a fiddle for you:

http://jsfiddle.net/TfuTE/

+1
source

check it out

http://codepen.io/Parthmy007/full/HKJuj

use Display: "table-cell" on both columns or set the maximum width and minimum width. And set the width of the first column to "auto".

0
source

Source: https://habr.com/ru/post/1487880/


All Articles