Child div 100% height to parent auto height

后端 未结 7 1148
孤城傲影
孤城傲影 2021-02-12 19:50

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:46

    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/

提交回复
热议问题