Child div 100% height to parent auto height

后端 未结 7 901
忘了有多久
忘了有多久 2021-02-12 19:47

Im here because other similar questions couldn\'t help my particular problem.

I need right div to be 100% height all the time, where the parent

7条回答
  •  执念已碎
    2021-02-12 20:34

    Make the right div position:absolute; and make the parent div position:relative; and then height:100%; will work for the right div. Make sure you also adjust its x-position and width accordingly. In this example I gave it a left:50px to make sure it appears to the right of the left column.

    JSFiddle http://jsfiddle.net/e9mvD/

提交回复
热议问题