I have the following table where the height of the tbody is dynamic. How can I make the height of the thead change dynamically in proportional to tbody, so that every cell of the tbody is perfectly aligned with the respective thead?
P.S. The table is obtained as an object, so its orientation cannot be edited as a vertical table.
<style>
h1
{
border-bottom: 3px solid #000;
}
#tabulu thead
{
float:left
}
#tabulu tbody
{
float:right
}
#tabulu tbody td
{
display: block;
padding:8px;
border: 1px solid black;
border-collapse: collapse;
/*multiline wrap*/
white-space:pre-wrap;
}
#tabulu thead th {
display: block;
text-align: left;
padding:8px;
border: 1px solid black;
border-collapse: collapse;
background-color: #808080; color: white;
}
#tabulu thead th:first-child
{
display:block;
}
#tabulu td:first-child
{
display:block;
}
</style>
<div id="tabulu"> <table><thead><tr><th>Feature Name</th><th>Feature ID </th><th>Platform</th><th>Version Number</th><th>Checklist 1.1</th><th>Checklist 1.2</th><th>Checklist 1.3</th><th>Additional Information</th></tr></thead><tbody><tr><td>AutoTest</td><td>REL0012</td><td>Web Application</td><td>1.2</td><td>Name: AutoTest Points
SubFeature Unique ID: Auto001
Possible Risk ID: RISK_Auto_001
Test Case Description: This test is for testing the flow
Steps to proceed: Step1- Open RF
Step2- Run RF
Step3- Exit RF
Pre-Requisite: RF Needed
Post-Requisite: Successful execution of the test
Inputs: bla bla bla
Expected Output: output-bla bla
Test: High
Comment: No Comment</td><td>Name:
SubFeature Unique ID:
Possible Risk ID:
Test Case Description:
Steps to proceed:
Pre-Requisite:
Post-Requisite:
Inputs:
Expected Output:
Test:
Comment:</td><td>Name:
SubFeature Unique ID:
Possible Risk ID:
Test Case Description:
Steps to proceed:
Pre-Requisite:
Post-Requisite:
Inputs:
Expected Output:
Test:
Comment:</td><td>Additional Description Additional Description</td></tr></tbody></table> </div>