My goal is to align all text vertically.
If I eliminate float: left; then the entire table disappears?
.div-table{
display:table;
width:auto;
background-color:#ffffff;
border-spacing:20px;
}
.div-table-row{
display:table-row;
width:auto;
clear:both;
}
.div-table-col{
float:left;
display:table-column;
width:180px;
background-color:LightSteelBlue;
height:60px;
text-align: center;
box-shadow: 3px 3px 3px 0 rgba(0,0,0,0.3) ;
vertical-align: middle;
}
<div class="div-table">
<div class="div-table-row">
<div class="div-table-col" align="center">Mortgage Lender</div>
<div class="div-table-col">Type</div>
<div class="div-table-col">Initial Period (mths)</div>
<div class="div-table-col">Initial Rate (%)</div>
<div class="div-table-col">SVR (%)</div>
<div class="div-table-col">Max Amount (£'s)</div>
<div class="div-table-col">Max LTV (%)</div>
<div class="div-table-col">Monthly Repayment (£'s)</div>
</div>
<div class="div-table-row">
<div class="div-table-col">Nationwide</div>
<div class="div-table-col">Fixed</div>
<div class="div-table-col">24</div>
<div class="div-table-col">1.99</div>
<div class="div-table-col">3.99</div>
<div class="div-table-col">1000000</div>
<div class="div-table-col">65</div>
<div class="div-table-col">Calc</div>
</div>
<div class="div-table-row">
<div class="div-table-col">Nationwide</div>
<div class="div-table-col">Fixed</div>
<div class="div-table-col">24</div>
<div class="div-table-col">1.99</div>
<div class="div-table-col">3.99</div>
<div class="div-table-col">1000000</div>
<div class="div-table-col">65</div>
<div class="div-table-col">Calc</div>
</div>
<div class="div-table-row">
<div class="div-table-col">Nationwide</div>
<div class="div-table-col">Fixed</div>
<div class="div-table-col">24</div>
<div class="div-table-col">1.99</div>
<div class="div-table-col">3.99</div>
<div class="div-table-col">1000000</div>
<div class="div-table-col">65</div>
<div class="div-table-col">Calc</div>
</div>
</div>
I chose to use div for creating the table for specific reasons, so please avoid suggesting to use a "<table>
for tabular data." :)
Thank you