I have incorporated some simple HTML tables on my website and I am encountering two issues that I need assistance with.
1) After adding these tables to my subpage, I noticed that the tables look almost identical but have their horizontal line between table rows in different positions.
2) I am seeking a way to combine two headers.
I have tried to resolve these problems using a code-Live editor without success.
div.blueTable {
border: 0px solid #FFFFFF;
background-color: #EEEEEE;
width: 100%;
text-align: left;
border-collapse: collapse;
}
.divTable.blueTable .divTableCell,
.divTable.blueTable .divTableHead {
border: 1px solid #AAAAAA;
padding: 3px 5px;
text-align: left;
}
.divTable.blueTable .divTableBody .divTableCell {
font-size: 13px;
}
.divTable.blueTable .divTableRow:nth-child(even) {
background: #FFFFFF;
}
.divTable.blueTable .divTableHeading {
background: #5DBCD2;
border-bottom: 2px solid #444444;
}
.divTable.blueTable .divTableHeading .divTableHead {
font-size: 14px;
font-weight: bold;
color: #FFFFFF;
text-align: left;
border-left: 0px solid #F5F4F4;
}
.divTable.blueTable .divTableHeading .divTableHead:first-child {
border-left: none;
}
.blueTable .tableFootStyle {
font-size: 14px;
}
.blueTable .tableFootStyle .links {
text-align: right;
}
.blueTable .tableFootStyle .links a {
display: inline-block;
background: #1C6EA4;
color: #FFFFFF;
padding: 2px 8px;
border-radius: 5px;
}
.blueTable.outerTableFooter {
border-top: none;
}
.blueTable.outerTableFooter .tableFootStyle {
padding: 3px 5px;
}
.divTable {
display: table;
}
.divTableRow {
display: table-row;
}
.divTableHeading {
display: table-header-group;
}
.divTableCell,
.divTableHead {
display: table-cell;
}
.divTableHeading {
display: table-header-group;
}
.divTableFoot {
display: table-footer-group;
}
.divTableBody {
display: table-row-group;
}
<div class="divTable blueTable" style="width: 100%">
<div class="divTableHeading">
<div class="divTableRow">
<div class="divTableHead">People</div>
<div class="divTableHead"></div>
</div>
</div>
<div class="divTableBody">
<div class="divTableRow">
<div class="divTableCell">Lang</div>
<div class="divTableCell">54</div>
</div>
<div class="divTableRow">
<div class="divTableCell">Height</div>
<div class="divTableCell">22</div>
</div>
<div class="divTableRow">
<div class="divTableCell">Weight</div>
<div class="divTableCell">66</div>
</div>
<div class="divTableRow">
<div class="divTableCell">Et</div>
<div class="divTableCell">55</div>
</div>
<div class="divTableRow">
<div class="divTableCell">Color</div>
<div class="divTableCell">wb</div>
</div>
<div class="divTableRow">
<div class="divTableCell">A</div>
<div class="divTableCell">10</div>
</div>
</div>
</div>
</br>
</br>
<div class="divTable blueTable" style="width: 100%">
<div class="divTableHeading">
<div class="divTableRow">
<div class="divTableHead">Country</div>
<div class="divTableHead"></div>
</div>
</div>
<div class="divTableBody">
<div class="divTableRow">
<div class="divTableCell">E</div>
<div class="divTableCell">11</div>
</div>
<div class="divTableRow">
<div class="divTableCell">P</div>
<div class="divTableCell">23</div>
</div>
<div class="divTableRow">
<div class="divTableCell">R</div>
<div class="divTableCell">32</div>
</div>
<div class="divTableRow">
<div class="divTableCell">H</div>
<div class="divTableCell">45</div>
</div>
<div class="divTableRow">
<div class="divTableCell">I</div>
<div class="divTableCell">57</div>
</div>
</div>
</div>
</br>
</br>