CSS for HTML dynamic layout with not fixed columns?

前端 未结 2 1185
旧时难觅i
旧时难觅i 2021-01-27 02:25

I want to set such layout both columns are dynamic - one is set by content second by the first column and minimum width. I found many solution where column is fixed with width b

相关标签:
2条回答
  • 2021-01-27 03:05

    There are different approaches for stuff like this ... an easy way would be to use display: table; for the container display: table-cell; for the childs and width: 1px; for the first child.

    I have made a fiddle for you:

    http://jsfiddle.net/TfuTE/

    0 讨论(0)
  • 2021-01-27 03:07

    check out this

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

    use Display : "table-cell" on both column or set max-width and min-width.and set first column width is "auto".

    0 讨论(0)
提交回复
热议问题