Make Div on right side fill out all available space

后端 未结 5 1351
清酒与你
清酒与你 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:18

    This is the working example: http://jsfiddle.net/tnm62/

    Explenation:
    1. Place both elements in one container.
    2. Position your left element absolute, set its width to 300px.
    3. Set left margin to your right element to 300px.

提交回复
热议问题