3 column layout (fixed, fluid, fixed) with minimum width

后端 未结 2 1641
悲哀的现实
悲哀的现实 2021-01-07 01:03

I have searched the web and just cannot seem to find a clean, simple, all browser friendly 3 column layout.

I am looking to have 3 column layout, the left column bei

2条回答
  •  被撕碎了的回忆
    2021-01-07 01:53

    If source order does not matter then one simple solution is to use display table/table cell. Make the wrapper 100% wide with desired minimum width. Specify widths for fixed width columns. With table display, all columns will have equal height.

    #wrapper {
      display: table;
      width: 100%;
      min-width: 1000px;
      min-height: 400px;
    }
    #column-1 {
      display: table-cell;
      background: #DDF;
      width: 200px;
    }
    #column-2 {
      display: table-cell;
      background: #EEE;
    }
    #column-3 {
      display: table-cell;
      background: #DDF;
      width: 200px;
    }
    = 200px
    >= 600px
    = 200px

提交回复
热议问题