I've got a group of div
s like so:
<div id="container">
<div id="tabs">
<div class="row"><div class="tab">....</div></div>
...
</div>
</div>
with the following css:
#container {
position:absolute;
top:48px;
bottom:0px;
width:100%;
}
#tabs {
display:table;
height:100%;
}
.row {
display:table-row;
}
.tab {
display:table-cell;
text-align:center;
vertical-align:middle;
}
This creates a group of element all the same height vertically down the left side of my area. The problem is, I want the .tab
s to be square. Since the tabs are dynamically sized to fit the vertical space, I can't define a width. How can I make the width match the height? Ideally this should be done without JavaScript, and pure css/html.
Here's a fiddle as requested.