I'm trying to make a div table and I'm getting annoying results.
body {
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
box-sizing: border-box;
}
.table-header {
color: white;
text-align: center;
margin: 0;
padding: 0;
background-color: #646464;
}
.table-cell {
background-color: yellow;
}
.short-cell {
height: 25px;
}
.col1 {
width: 15%;
display: inline-block;
text-align: center;
}
.col2 {
width: 35%;
display: inline-block;
}
.col3 {
width: 48%;
display: inline-block;
}
.response {
border-width: 2px;
padding: 0px;
width: 98%;
border-width: 0;
}
<div class="table-header col1">Question #</div>
<div class="table-header col2">Question</div>
<div class="table-header col3">Response</div>
<div class="table-cell col1 short-cell">1</div>
<div class="table-cell col2 short-cell">Question goes here</div>
<div class="table-cell col3 short-cell">
</div>
Before adding the final div in my code sample (the far bottom right cell), things look pretty good:
But as soon as I add the final cell, the previous two cells are moved down and I can't figure out why.
I'm running the latest stable Chrome (41).
What's causing this movement and how can I fix it so that the 3 table divs (and eventually more rows) are displayed in a proper row?