3 columns, center column fixed, sides fill parents

后端 未结 3 1078
南旧
南旧 2020-12-01 23:05

How can I make B be a fixed 800px size while A and C fill the space, so they are all together touching? http://jsfiddle.net/8ufuV/

3条回答
  •  执笔经年
    2020-12-01 23:20

    HTML:

    a
    b
    c

    CSS:

    #main {
      display:table;
      width:100%
    }
    
    div {
      display: table-cell
    }
    
    #leftblock{
      top: 0px;
      left: 0px;
      margin: 0px;
      padding: 10px;
      border: 5px solid #ccc;
      voice-family: "\"}\"";
      voice-family:inherit;
    }
    
    #contentblock{
      padding: 10px;
      border: 5px solid #ccc;
      width: 100px;
    }
    
    
    #rightblock{
      top: 0px;
      right: 0px;
      margin: 0px;
      padding: 10px;
      border: 5px solid #ccc;
      voice-family: "\"}\"";
      voice-family:inherit;
    }
    

提交回复
热议问题