Layout with table
An experiment to see if there are any benefits to layout app using tables.
by nil
HTML
<div id="container">
<table>
<tr id="header">
<td>
<div>icon</div>
<div></div>
<div>button</div>
</td>
</tr>
<tr id="navbar"><td>nav</td></tr>
<tr id="content-area"><td></td></tr>
<tr id="footer">
<td>
<div>Copyright</div>
</td>
</tr>
</table>
</div>
CSS
#container {
height: 400px;
width: 300px;
border: 1px solid blue;
padding: 10px;
}
table {
border: 1px solid green;
width: 100%;
height: 100%;
}
tr {
border: 1px solid grey;
padding: 0;
}
td {
border: 1px solid green;
margin: 0;
}
#content-area {
background: grey;
}
#header {
height: 50px;
background: yellow;
width: 100%;
}
#footer {
width: 100%;
height: 30px;
background: yellow;
}
#header div:first-child {
float: left;
}
#header div:last-child {
float: right;
}
#footer div {
text-align: center;
}
#navbar > td {
height: 20px;
}