I'm trying to create a two column 100% height layout using the display table-cell property. It is working fine on Chrome, but I'm not having success on Firefox nor IE.
Here is the fiddle: http://jsfiddle.net/ehfa0kk8/5/
Take a look at how it works on Chrome. Any idea of how to make this work?
<div id="table">
<div id="row">
<div id="cell_1">
<div id="overflown_div">
long content goes here...
</div>
</div>
<div id="cell_2">
Blah blah blah
</div>
</div>
</div>
And the CSS
html, body {
height: 100%;
margin: 0;
padding: 0;
}
#table {
width: 100%;
display: table;
height: 100%;
}
#row {
display: table-row;
}
#cell_1, #cell_2 {
display: table-cell;
height: 100%;
}
#cell_1 {
width: 390px;
background: aliceblue;
}
#cell_2 {
background: yellow;
}
#overflown_div {
height: 100%;
overflow: scroll;
padding: 10px;
}
UPDATE: First, there should be enough content on the left column so it will overflow. On Chrome it shows a scroll bar so you can scroll just the content of that column (cell). On Firefox it doesn't happen.
EXAMPLE:
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…