Make Div on right side fill out all available space

后端 未结 5 1395
清酒与你
清酒与你 2021-01-28 04:27

I want to create two divs beside each other, however I want the one on the left side to be 300px, and the right one to take up the remaining amount on the screen. How would that

5条回答
  •  不要未来只要你来
    2021-01-28 05:10

    Here's something for newer browsers (not IE):

    CSS:

    #container {
        display: box;
    }
    
    #left {
        width: 400px;
    }
    
    #right {
        box-flex: 1;
    }
    

    HTML:

    Left

    Demo: http://jsfiddle.net/N5zhH/1/

提交回复
热议问题