I can't seem to figure out how to tackle a seemingly easy problem. I need to create a 2x2 box layout that fills the whole screen and then switches to a single column at a certain width.
The tricky part for me isn't making it break down, but rather creating a fluid 2x2 grid.
I tried using this CSS:
.outer-div{
display: table;
width: 100%;
height: 100%;
}
.inner-div{
display: table-row;
width: 100%;
height: 100%;
}
.inner-block{
display: table-cell;
width: 50%;
height: 100%;
}
It kind of works, but doesn't feel as fluid as I'd like. Is there a better way to do this? Any suggestions are welcome!
(see attached image for visual aid)
https://i.sstatic.net/nH4ML.jpg
EDIT I realized my solution was actually working fine. The issue is that I have another div with absolute positioning and a fixed height that I'm not sure how to accommodate in the layout. Check out this example on Fiddle: https://jsfiddle.net/q2j940r1/1/