Expand a div to fill the remaining width

前端 未结 21 1212
一生所求
一生所求 2020-11-21 22:21

I want a two-column div layout, where each one can have variable width e.g.

21条回答
  •  南方客
    南方客 (楼主)
    2020-11-21 23:06

    This would be a good example of something that's trivial to do with tables and hard (if not impossible, at least in a cross-browser sense) to do with CSS.

    If both the columns were fixed width, this would be easy.

    If one of the columns was fixed width, this would be slightly harder but entirely doable.

    With both columns variable width, IMHO you need to just use a two-column table.

提交回复
热议问题