Proper width Alignment of child table inside parent table in HTML












0














I have created a collapsible HTML nested table.
But i am not able to set the proper width after so many futile efforts.
My child table is not fitting to my parent table's head.



Here is the code snippet:
https://jsfiddle.net/preetigupta617/bpLkdx13/



Code:
HTML



<head>
<script>
$('.content').css('display','none');
$( ".collapsible" ).click(function() {
id = $(this).attr('id');
num = id.split("_").pop();
// document.getElementById("mytable_"+num).classList.toggle("show");
if(document.getElementById("mytable_"+num).style.display=='none') {
document.getElementById("mytable_"+num).style.display= 'block';
}
else {
document.getElementById("mytable_"+num).style.display= 'none'
}
console.log(num);
console.log(document.getElementById("mytable_"+num).innerHTML);
</script>
<style>
table {border-collapse:collapse; table-layout:fixed; width:310px;}
table td {border:solid 1px #fab; width:100px; word-wrap:break-word;}
/* Style the button that is used to open and close the collapsible content */
.collapsible {
cursor: pointer;
padding: 18px;
width: 100%;
border: none;
text-align: left;
outline: none;
font-size: 15px;
}

/* Add a background color to the button if it is clicked on (add the .active class with JS), and when you move the mouse over it (hover) */
.active, .collapsible:hover {
background-color: #ccc;
}

/* Style the collapsible content. Note: hidden by default */
.content {
padding: 0 18px;
display: none;
overflow: hidden;
background-color: #f1f1f1;
}
</style>
</head>
<body>
<table style='width:80%;margin:0 auto;' border='1' bordercolor='BLACK'>
<thead >
<tr class='w3-cyan'><th>S.no</th><th>Command</th><th>Failure Reasons</th><th>Testcase Affected</th><th>Response</th></tr></thead>
<tr id='myBtn_1' class='collapsible'><td>1</td><td colspan=4>build_model</td></tr>
<tr >
<td colspan=1></td><td colspan=1></td>
<td id='mytable_1' class='content' colspan=3><table>
<tr><td>MACHINE_ERROR,OTHER_INFO,WARNINGS,PATTERN_VAR</td><td><a href='http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/build_model-MACHINE_ERROR-OTHER_INFO-WARNINGS-PATTERN_VAR'>1</a></td><td> Regold</td></tr>
</table></td></tr>
<tr id='myBtn_2' class='collapsible'><td>2</td><td colspan=4>build_testmode</td></tr>
<tr >
<td colspan=1></td><td colspan=1></td>
<td id='mytable_2' class='content' colspan=3><table>
<tr><td>OTHER_INFO,COVERAGE_VAR</td><td><a href='http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/build_testmode-OTHER_INFO-COVERAGE_VAR'>1</a></td><td> Open CCR</td></tr>
<tr><td>CORE,TESTCASE_ERRORS,CRITICAL_ERRORS,MACHINE_ERROR,PATTERN_VAR,COVERAGE_VAR</td><td><a href='http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/build_testmode-CORE-TESTCASE_ERRORS-CRITICAL_ERRORS-MACHINE_ERROR-PATTERN_VAR-COVERAGE_VAR'>1</a></td><td> Fix Testcase</td></tr>
</table></td></tr>
<tr id='myBtn_3' class='collapsible'><td>3</td><td colspan=4>commit_tests</td></tr>
<tr >
<td colspan=1></td><td colspan=1></td>
<td id='mytable_3' class='content' colspan=3><table>
<tr><td>MACHINE_ERROR,WARNINGS</td><td><a href='http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/commit_tests-MACHINE_ERROR-WARNINGS'>1</a></td><td> Rerun</td></tr>
</table></td></tr>
<tr id='myBtn_4' class='collapsible'><td>4</td><td colspan=4>create_logic_tests</td></tr>
<tr >
<td colspan=1></td><td colspan=1></td>
<td id='mytable_4' class='content' colspan=3><table>
<tr><td>CORE,OTHER_INFO,COVERAGE_VAR</td><td><a href='http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/create_logic_tests-CORE-OTHER_INFO-COVERAGE_VAR'>1</a></td><td> Regold</td></tr>
<tr><td>CORE,CRITICAL_ERRORS,MACHINE_ERROR,OTHER_INFO,WARNINGS,SEVERE,PATTERN_VAR,COVERAGE_VAR</td><td><a href='http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/create_logic_tests-CORE-CRITICAL_ERRORS-MACHINE_ERROR-OTHER_INFO-WARNINGS-SEVERE-PATTERN_VAR-COVERAGE_VAR'>1</a></td><td> Rerun</td></tr>
</table></td></tr>
<tr id='myBtn_5' class='collapsible'><td>5</td><td colspan=4>diagnose_failures</td></tr>
<tr >
<td colspan=1></td><td colspan=1></td>
<td id='mytable_5' class='content' colspan=3><table>
<tr><td>TESTCASE_ERRORS,CRITICAL_ERRORS,PATTERN_VAR,COVERAGE_VAR</td><td><a href='http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/diagnose_failures-TESTCASE_ERRORS-CRITICAL_ERRORS-PATTERN_VAR-COVERAGE_VAR'>1</a></td><td> Rerun</td></tr>
</table></td></tr>
<tr id='myBtn_6' class='collapsible'><td>6</td><td colspan=4>verify_test_structures</td></tr>
<tr >
<td colspan=1></td><td colspan=1></td>
<td id='mytable_6' class='content' colspan=3><table>
<tr><td>TESTCASE_ERRORS,MACHINE_ERROR,OTHER_INFO,WARNINGS,SEVERE,COVERAGE_VAR</td><td><a href='http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/verify_test_structures-TESTCASE_ERRORS-MACHINE_ERROR-OTHER_INFO-WARNINGS-SEVERE-COVERAGE_VAR'>1</a></td><td> Open CCR</td></tr>
</table></td></tr>
<tr id='myBtn_7' class='collapsible'><td>7</td><td colspan=4>write_toggle_gram</td></tr>
<tr >
<td colspan=1></td><td colspan=1></td>
<td id='mytable_7' class='content' colspan=3><table>
<tr><td>CORE</td><td><a href='http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/write_toggle_gram-CORE'>1</a></td><td> Fix Testcase</td></tr>
</table></td></tr>
</table>
</body>


PS:You can also use the jsfiddle link i have given in post too.
The foldable HTML table is working in actual but not in jsfiddle site.



But i want help only in case of css,i.e i want to set the child table in last 3 columns properly.How can i achieve that?
I tried , but end up only scratching my head .



Thanks in advance !!



[Output with this current code]1










share|improve this question



























    0














    I have created a collapsible HTML nested table.
    But i am not able to set the proper width after so many futile efforts.
    My child table is not fitting to my parent table's head.



    Here is the code snippet:
    https://jsfiddle.net/preetigupta617/bpLkdx13/



    Code:
    HTML



    <head>
    <script>
    $('.content').css('display','none');
    $( ".collapsible" ).click(function() {
    id = $(this).attr('id');
    num = id.split("_").pop();
    // document.getElementById("mytable_"+num).classList.toggle("show");
    if(document.getElementById("mytable_"+num).style.display=='none') {
    document.getElementById("mytable_"+num).style.display= 'block';
    }
    else {
    document.getElementById("mytable_"+num).style.display= 'none'
    }
    console.log(num);
    console.log(document.getElementById("mytable_"+num).innerHTML);
    </script>
    <style>
    table {border-collapse:collapse; table-layout:fixed; width:310px;}
    table td {border:solid 1px #fab; width:100px; word-wrap:break-word;}
    /* Style the button that is used to open and close the collapsible content */
    .collapsible {
    cursor: pointer;
    padding: 18px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 15px;
    }

    /* Add a background color to the button if it is clicked on (add the .active class with JS), and when you move the mouse over it (hover) */
    .active, .collapsible:hover {
    background-color: #ccc;
    }

    /* Style the collapsible content. Note: hidden by default */
    .content {
    padding: 0 18px;
    display: none;
    overflow: hidden;
    background-color: #f1f1f1;
    }
    </style>
    </head>
    <body>
    <table style='width:80%;margin:0 auto;' border='1' bordercolor='BLACK'>
    <thead >
    <tr class='w3-cyan'><th>S.no</th><th>Command</th><th>Failure Reasons</th><th>Testcase Affected</th><th>Response</th></tr></thead>
    <tr id='myBtn_1' class='collapsible'><td>1</td><td colspan=4>build_model</td></tr>
    <tr >
    <td colspan=1></td><td colspan=1></td>
    <td id='mytable_1' class='content' colspan=3><table>
    <tr><td>MACHINE_ERROR,OTHER_INFO,WARNINGS,PATTERN_VAR</td><td><a href='http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/build_model-MACHINE_ERROR-OTHER_INFO-WARNINGS-PATTERN_VAR'>1</a></td><td> Regold</td></tr>
    </table></td></tr>
    <tr id='myBtn_2' class='collapsible'><td>2</td><td colspan=4>build_testmode</td></tr>
    <tr >
    <td colspan=1></td><td colspan=1></td>
    <td id='mytable_2' class='content' colspan=3><table>
    <tr><td>OTHER_INFO,COVERAGE_VAR</td><td><a href='http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/build_testmode-OTHER_INFO-COVERAGE_VAR'>1</a></td><td> Open CCR</td></tr>
    <tr><td>CORE,TESTCASE_ERRORS,CRITICAL_ERRORS,MACHINE_ERROR,PATTERN_VAR,COVERAGE_VAR</td><td><a href='http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/build_testmode-CORE-TESTCASE_ERRORS-CRITICAL_ERRORS-MACHINE_ERROR-PATTERN_VAR-COVERAGE_VAR'>1</a></td><td> Fix Testcase</td></tr>
    </table></td></tr>
    <tr id='myBtn_3' class='collapsible'><td>3</td><td colspan=4>commit_tests</td></tr>
    <tr >
    <td colspan=1></td><td colspan=1></td>
    <td id='mytable_3' class='content' colspan=3><table>
    <tr><td>MACHINE_ERROR,WARNINGS</td><td><a href='http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/commit_tests-MACHINE_ERROR-WARNINGS'>1</a></td><td> Rerun</td></tr>
    </table></td></tr>
    <tr id='myBtn_4' class='collapsible'><td>4</td><td colspan=4>create_logic_tests</td></tr>
    <tr >
    <td colspan=1></td><td colspan=1></td>
    <td id='mytable_4' class='content' colspan=3><table>
    <tr><td>CORE,OTHER_INFO,COVERAGE_VAR</td><td><a href='http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/create_logic_tests-CORE-OTHER_INFO-COVERAGE_VAR'>1</a></td><td> Regold</td></tr>
    <tr><td>CORE,CRITICAL_ERRORS,MACHINE_ERROR,OTHER_INFO,WARNINGS,SEVERE,PATTERN_VAR,COVERAGE_VAR</td><td><a href='http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/create_logic_tests-CORE-CRITICAL_ERRORS-MACHINE_ERROR-OTHER_INFO-WARNINGS-SEVERE-PATTERN_VAR-COVERAGE_VAR'>1</a></td><td> Rerun</td></tr>
    </table></td></tr>
    <tr id='myBtn_5' class='collapsible'><td>5</td><td colspan=4>diagnose_failures</td></tr>
    <tr >
    <td colspan=1></td><td colspan=1></td>
    <td id='mytable_5' class='content' colspan=3><table>
    <tr><td>TESTCASE_ERRORS,CRITICAL_ERRORS,PATTERN_VAR,COVERAGE_VAR</td><td><a href='http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/diagnose_failures-TESTCASE_ERRORS-CRITICAL_ERRORS-PATTERN_VAR-COVERAGE_VAR'>1</a></td><td> Rerun</td></tr>
    </table></td></tr>
    <tr id='myBtn_6' class='collapsible'><td>6</td><td colspan=4>verify_test_structures</td></tr>
    <tr >
    <td colspan=1></td><td colspan=1></td>
    <td id='mytable_6' class='content' colspan=3><table>
    <tr><td>TESTCASE_ERRORS,MACHINE_ERROR,OTHER_INFO,WARNINGS,SEVERE,COVERAGE_VAR</td><td><a href='http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/verify_test_structures-TESTCASE_ERRORS-MACHINE_ERROR-OTHER_INFO-WARNINGS-SEVERE-COVERAGE_VAR'>1</a></td><td> Open CCR</td></tr>
    </table></td></tr>
    <tr id='myBtn_7' class='collapsible'><td>7</td><td colspan=4>write_toggle_gram</td></tr>
    <tr >
    <td colspan=1></td><td colspan=1></td>
    <td id='mytable_7' class='content' colspan=3><table>
    <tr><td>CORE</td><td><a href='http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/write_toggle_gram-CORE'>1</a></td><td> Fix Testcase</td></tr>
    </table></td></tr>
    </table>
    </body>


    PS:You can also use the jsfiddle link i have given in post too.
    The foldable HTML table is working in actual but not in jsfiddle site.



    But i want help only in case of css,i.e i want to set the child table in last 3 columns properly.How can i achieve that?
    I tried , but end up only scratching my head .



    Thanks in advance !!



    [Output with this current code]1










    share|improve this question

























      0












      0








      0







      I have created a collapsible HTML nested table.
      But i am not able to set the proper width after so many futile efforts.
      My child table is not fitting to my parent table's head.



      Here is the code snippet:
      https://jsfiddle.net/preetigupta617/bpLkdx13/



      Code:
      HTML



      <head>
      <script>
      $('.content').css('display','none');
      $( ".collapsible" ).click(function() {
      id = $(this).attr('id');
      num = id.split("_").pop();
      // document.getElementById("mytable_"+num).classList.toggle("show");
      if(document.getElementById("mytable_"+num).style.display=='none') {
      document.getElementById("mytable_"+num).style.display= 'block';
      }
      else {
      document.getElementById("mytable_"+num).style.display= 'none'
      }
      console.log(num);
      console.log(document.getElementById("mytable_"+num).innerHTML);
      </script>
      <style>
      table {border-collapse:collapse; table-layout:fixed; width:310px;}
      table td {border:solid 1px #fab; width:100px; word-wrap:break-word;}
      /* Style the button that is used to open and close the collapsible content */
      .collapsible {
      cursor: pointer;
      padding: 18px;
      width: 100%;
      border: none;
      text-align: left;
      outline: none;
      font-size: 15px;
      }

      /* Add a background color to the button if it is clicked on (add the .active class with JS), and when you move the mouse over it (hover) */
      .active, .collapsible:hover {
      background-color: #ccc;
      }

      /* Style the collapsible content. Note: hidden by default */
      .content {
      padding: 0 18px;
      display: none;
      overflow: hidden;
      background-color: #f1f1f1;
      }
      </style>
      </head>
      <body>
      <table style='width:80%;margin:0 auto;' border='1' bordercolor='BLACK'>
      <thead >
      <tr class='w3-cyan'><th>S.no</th><th>Command</th><th>Failure Reasons</th><th>Testcase Affected</th><th>Response</th></tr></thead>
      <tr id='myBtn_1' class='collapsible'><td>1</td><td colspan=4>build_model</td></tr>
      <tr >
      <td colspan=1></td><td colspan=1></td>
      <td id='mytable_1' class='content' colspan=3><table>
      <tr><td>MACHINE_ERROR,OTHER_INFO,WARNINGS,PATTERN_VAR</td><td><a href='http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/build_model-MACHINE_ERROR-OTHER_INFO-WARNINGS-PATTERN_VAR'>1</a></td><td> Regold</td></tr>
      </table></td></tr>
      <tr id='myBtn_2' class='collapsible'><td>2</td><td colspan=4>build_testmode</td></tr>
      <tr >
      <td colspan=1></td><td colspan=1></td>
      <td id='mytable_2' class='content' colspan=3><table>
      <tr><td>OTHER_INFO,COVERAGE_VAR</td><td><a href='http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/build_testmode-OTHER_INFO-COVERAGE_VAR'>1</a></td><td> Open CCR</td></tr>
      <tr><td>CORE,TESTCASE_ERRORS,CRITICAL_ERRORS,MACHINE_ERROR,PATTERN_VAR,COVERAGE_VAR</td><td><a href='http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/build_testmode-CORE-TESTCASE_ERRORS-CRITICAL_ERRORS-MACHINE_ERROR-PATTERN_VAR-COVERAGE_VAR'>1</a></td><td> Fix Testcase</td></tr>
      </table></td></tr>
      <tr id='myBtn_3' class='collapsible'><td>3</td><td colspan=4>commit_tests</td></tr>
      <tr >
      <td colspan=1></td><td colspan=1></td>
      <td id='mytable_3' class='content' colspan=3><table>
      <tr><td>MACHINE_ERROR,WARNINGS</td><td><a href='http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/commit_tests-MACHINE_ERROR-WARNINGS'>1</a></td><td> Rerun</td></tr>
      </table></td></tr>
      <tr id='myBtn_4' class='collapsible'><td>4</td><td colspan=4>create_logic_tests</td></tr>
      <tr >
      <td colspan=1></td><td colspan=1></td>
      <td id='mytable_4' class='content' colspan=3><table>
      <tr><td>CORE,OTHER_INFO,COVERAGE_VAR</td><td><a href='http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/create_logic_tests-CORE-OTHER_INFO-COVERAGE_VAR'>1</a></td><td> Regold</td></tr>
      <tr><td>CORE,CRITICAL_ERRORS,MACHINE_ERROR,OTHER_INFO,WARNINGS,SEVERE,PATTERN_VAR,COVERAGE_VAR</td><td><a href='http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/create_logic_tests-CORE-CRITICAL_ERRORS-MACHINE_ERROR-OTHER_INFO-WARNINGS-SEVERE-PATTERN_VAR-COVERAGE_VAR'>1</a></td><td> Rerun</td></tr>
      </table></td></tr>
      <tr id='myBtn_5' class='collapsible'><td>5</td><td colspan=4>diagnose_failures</td></tr>
      <tr >
      <td colspan=1></td><td colspan=1></td>
      <td id='mytable_5' class='content' colspan=3><table>
      <tr><td>TESTCASE_ERRORS,CRITICAL_ERRORS,PATTERN_VAR,COVERAGE_VAR</td><td><a href='http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/diagnose_failures-TESTCASE_ERRORS-CRITICAL_ERRORS-PATTERN_VAR-COVERAGE_VAR'>1</a></td><td> Rerun</td></tr>
      </table></td></tr>
      <tr id='myBtn_6' class='collapsible'><td>6</td><td colspan=4>verify_test_structures</td></tr>
      <tr >
      <td colspan=1></td><td colspan=1></td>
      <td id='mytable_6' class='content' colspan=3><table>
      <tr><td>TESTCASE_ERRORS,MACHINE_ERROR,OTHER_INFO,WARNINGS,SEVERE,COVERAGE_VAR</td><td><a href='http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/verify_test_structures-TESTCASE_ERRORS-MACHINE_ERROR-OTHER_INFO-WARNINGS-SEVERE-COVERAGE_VAR'>1</a></td><td> Open CCR</td></tr>
      </table></td></tr>
      <tr id='myBtn_7' class='collapsible'><td>7</td><td colspan=4>write_toggle_gram</td></tr>
      <tr >
      <td colspan=1></td><td colspan=1></td>
      <td id='mytable_7' class='content' colspan=3><table>
      <tr><td>CORE</td><td><a href='http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/write_toggle_gram-CORE'>1</a></td><td> Fix Testcase</td></tr>
      </table></td></tr>
      </table>
      </body>


      PS:You can also use the jsfiddle link i have given in post too.
      The foldable HTML table is working in actual but not in jsfiddle site.



      But i want help only in case of css,i.e i want to set the child table in last 3 columns properly.How can i achieve that?
      I tried , but end up only scratching my head .



      Thanks in advance !!



      [Output with this current code]1










      share|improve this question













      I have created a collapsible HTML nested table.
      But i am not able to set the proper width after so many futile efforts.
      My child table is not fitting to my parent table's head.



      Here is the code snippet:
      https://jsfiddle.net/preetigupta617/bpLkdx13/



      Code:
      HTML



      <head>
      <script>
      $('.content').css('display','none');
      $( ".collapsible" ).click(function() {
      id = $(this).attr('id');
      num = id.split("_").pop();
      // document.getElementById("mytable_"+num).classList.toggle("show");
      if(document.getElementById("mytable_"+num).style.display=='none') {
      document.getElementById("mytable_"+num).style.display= 'block';
      }
      else {
      document.getElementById("mytable_"+num).style.display= 'none'
      }
      console.log(num);
      console.log(document.getElementById("mytable_"+num).innerHTML);
      </script>
      <style>
      table {border-collapse:collapse; table-layout:fixed; width:310px;}
      table td {border:solid 1px #fab; width:100px; word-wrap:break-word;}
      /* Style the button that is used to open and close the collapsible content */
      .collapsible {
      cursor: pointer;
      padding: 18px;
      width: 100%;
      border: none;
      text-align: left;
      outline: none;
      font-size: 15px;
      }

      /* Add a background color to the button if it is clicked on (add the .active class with JS), and when you move the mouse over it (hover) */
      .active, .collapsible:hover {
      background-color: #ccc;
      }

      /* Style the collapsible content. Note: hidden by default */
      .content {
      padding: 0 18px;
      display: none;
      overflow: hidden;
      background-color: #f1f1f1;
      }
      </style>
      </head>
      <body>
      <table style='width:80%;margin:0 auto;' border='1' bordercolor='BLACK'>
      <thead >
      <tr class='w3-cyan'><th>S.no</th><th>Command</th><th>Failure Reasons</th><th>Testcase Affected</th><th>Response</th></tr></thead>
      <tr id='myBtn_1' class='collapsible'><td>1</td><td colspan=4>build_model</td></tr>
      <tr >
      <td colspan=1></td><td colspan=1></td>
      <td id='mytable_1' class='content' colspan=3><table>
      <tr><td>MACHINE_ERROR,OTHER_INFO,WARNINGS,PATTERN_VAR</td><td><a href='http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/build_model-MACHINE_ERROR-OTHER_INFO-WARNINGS-PATTERN_VAR'>1</a></td><td> Regold</td></tr>
      </table></td></tr>
      <tr id='myBtn_2' class='collapsible'><td>2</td><td colspan=4>build_testmode</td></tr>
      <tr >
      <td colspan=1></td><td colspan=1></td>
      <td id='mytable_2' class='content' colspan=3><table>
      <tr><td>OTHER_INFO,COVERAGE_VAR</td><td><a href='http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/build_testmode-OTHER_INFO-COVERAGE_VAR'>1</a></td><td> Open CCR</td></tr>
      <tr><td>CORE,TESTCASE_ERRORS,CRITICAL_ERRORS,MACHINE_ERROR,PATTERN_VAR,COVERAGE_VAR</td><td><a href='http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/build_testmode-CORE-TESTCASE_ERRORS-CRITICAL_ERRORS-MACHINE_ERROR-PATTERN_VAR-COVERAGE_VAR'>1</a></td><td> Fix Testcase</td></tr>
      </table></td></tr>
      <tr id='myBtn_3' class='collapsible'><td>3</td><td colspan=4>commit_tests</td></tr>
      <tr >
      <td colspan=1></td><td colspan=1></td>
      <td id='mytable_3' class='content' colspan=3><table>
      <tr><td>MACHINE_ERROR,WARNINGS</td><td><a href='http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/commit_tests-MACHINE_ERROR-WARNINGS'>1</a></td><td> Rerun</td></tr>
      </table></td></tr>
      <tr id='myBtn_4' class='collapsible'><td>4</td><td colspan=4>create_logic_tests</td></tr>
      <tr >
      <td colspan=1></td><td colspan=1></td>
      <td id='mytable_4' class='content' colspan=3><table>
      <tr><td>CORE,OTHER_INFO,COVERAGE_VAR</td><td><a href='http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/create_logic_tests-CORE-OTHER_INFO-COVERAGE_VAR'>1</a></td><td> Regold</td></tr>
      <tr><td>CORE,CRITICAL_ERRORS,MACHINE_ERROR,OTHER_INFO,WARNINGS,SEVERE,PATTERN_VAR,COVERAGE_VAR</td><td><a href='http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/create_logic_tests-CORE-CRITICAL_ERRORS-MACHINE_ERROR-OTHER_INFO-WARNINGS-SEVERE-PATTERN_VAR-COVERAGE_VAR'>1</a></td><td> Rerun</td></tr>
      </table></td></tr>
      <tr id='myBtn_5' class='collapsible'><td>5</td><td colspan=4>diagnose_failures</td></tr>
      <tr >
      <td colspan=1></td><td colspan=1></td>
      <td id='mytable_5' class='content' colspan=3><table>
      <tr><td>TESTCASE_ERRORS,CRITICAL_ERRORS,PATTERN_VAR,COVERAGE_VAR</td><td><a href='http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/diagnose_failures-TESTCASE_ERRORS-CRITICAL_ERRORS-PATTERN_VAR-COVERAGE_VAR'>1</a></td><td> Rerun</td></tr>
      </table></td></tr>
      <tr id='myBtn_6' class='collapsible'><td>6</td><td colspan=4>verify_test_structures</td></tr>
      <tr >
      <td colspan=1></td><td colspan=1></td>
      <td id='mytable_6' class='content' colspan=3><table>
      <tr><td>TESTCASE_ERRORS,MACHINE_ERROR,OTHER_INFO,WARNINGS,SEVERE,COVERAGE_VAR</td><td><a href='http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/verify_test_structures-TESTCASE_ERRORS-MACHINE_ERROR-OTHER_INFO-WARNINGS-SEVERE-COVERAGE_VAR'>1</a></td><td> Open CCR</td></tr>
      </table></td></tr>
      <tr id='myBtn_7' class='collapsible'><td>7</td><td colspan=4>write_toggle_gram</td></tr>
      <tr >
      <td colspan=1></td><td colspan=1></td>
      <td id='mytable_7' class='content' colspan=3><table>
      <tr><td>CORE</td><td><a href='http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/write_toggle_gram-CORE'>1</a></td><td> Fix Testcase</td></tr>
      </table></td></tr>
      </table>
      </body>


      PS:You can also use the jsfiddle link i have given in post too.
      The foldable HTML table is working in actual but not in jsfiddle site.



      But i want help only in case of css,i.e i want to set the child table in last 3 columns properly.How can i achieve that?
      I tried , but end up only scratching my head .



      Thanks in advance !!



      [Output with this current code]1







      html css nested






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 22 at 17:48









      confused

      296




      296
























          2 Answers
          2






          active

          oldest

          votes


















          0














          Here you are:






          $(".collapsible").click(function() {
          $(this).next('tr').toggle();
          });

          table {
          border-collapse: collapse;
          table-layout: fixed;
          width: 80%;
          margin: 0 auto;
          }

          th {
          border: solid 1px;
          }

          table td {
          border: solid 1px #fab;
          width: 100px;
          word-wrap: break-word;
          }

          table table {
          width: 100%;
          }


          /* Style the button that is used to open and close the collapsible content */

          .collapsible {
          cursor: pointer;
          padding: 18px;
          width: 100%;
          border: none;
          text-align: left;
          outline: none;
          font-size: 15px;
          }

          .collapsible+tr:not(:nth-child(2)) {
          display: none
          }


          /* Add a background color to the button if it is clicked on (add the .active class with JS), and when you move the mouse over it (hover) */

          .active,
          .collapsible:hover {
          background-color: #ccc;
          }


          /* Style the collapsible content. Note: hidden by default */

          .content {
          padding: 0;
          overflow: hidden;
          background-color: #f1f1f1;
          }

          <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
          <div class="w3-card w3-round w3-pink">
          <h1>
          <center>Regression Results</center>
          </h1>
          </div>
          <table>
          <thead>
          <tr class="w3-cyan">
          <th>S.no</th>
          <th>Command</th>
          <th>Failure Reasons</th>
          <th>Testcase Affected</th>
          <th>Response</th>
          </tr>
          </thead>
          <tbody>
          <tr class="collapsible">
          <td>1</td>
          <td colspan="4">build_model</td>
          </tr>
          <tr>
          <td></td>
          <td></td>
          <td class="content" colspan="3">
          <table>
          <tbody>
          <tr>
          <td>MACHINE_ERROR,OTHER_INFO,WARNINGS,PATTERN_VAR</td>
          <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/build_model-MACHINE_ERROR-OTHER_INFO-WARNINGS-PATTERN_VAR">1</a></td>
          <td> Regold</td>
          </tr>
          </tbody>
          </table>
          </td>
          </tr>
          <tr class="collapsible">
          <td>2</td>
          <td colspan="4">build_testmode</td>
          </tr>
          <tr>
          <td></td>
          <td></td>
          <td class="content" colspan="3">
          <table>
          <tbody>
          <tr>
          <td>OTHER_INFO,COVERAGE_VAR</td>
          <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/build_testmode-OTHER_INFO-COVERAGE_VAR">1</a></td>
          <td> Open CCR</td>
          </tr>
          <tr>
          <td>CORE,TESTCASE_ERRORS,CRITICAL_ERRORS,MACHINE_ERROR,PATTERN_VAR,COVERAGE_VAR</td>
          <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/build_testmode-CORE-TESTCASE_ERRORS-CRITICAL_ERRORS-MACHINE_ERROR-PATTERN_VAR-COVERAGE_VAR">1</a></td>
          <td> Fix Testcase</td>
          </tr>
          </tbody>
          </table>
          </td>
          </tr>
          <tr class="collapsible">
          <td>3</td>
          <td colspan="4">commit_tests</td>
          </tr>
          <tr>
          <td></td>
          <td></td>
          <td class="content" colspan="3">
          <table>
          <tbody>
          <tr>
          <td>MACHINE_ERROR,WARNINGS</td>
          <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/commit_tests-MACHINE_ERROR-WARNINGS">1</a></td>
          <td> Rerun</td>
          </tr>
          </tbody>
          </table>
          </td>
          </tr>
          <tr class="collapsible">
          <td>4</td>
          <td colspan="4">create_logic_tests</td>
          </tr>
          <tr>
          <td></td>
          <td></td>
          <td class="content" colspan="3">
          <table>
          <tbody>
          <tr>
          <td>CORE,OTHER_INFO,COVERAGE_VAR</td>
          <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/create_logic_tests-CORE-OTHER_INFO-COVERAGE_VAR">1</a></td>
          <td> Regold</td>
          </tr>
          <tr>
          <td>CORE,CRITICAL_ERRORS,MACHINE_ERROR,OTHER_INFO,WARNINGS,SEVERE,PATTERN_VAR,COVERAGE_VAR</td>
          <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/create_logic_tests-CORE-CRITICAL_ERRORS-MACHINE_ERROR-OTHER_INFO-WARNINGS-SEVERE-PATTERN_VAR-COVERAGE_VAR">1</a></td>
          <td> Rerun</td>
          </tr>
          </tbody>
          </table>
          </td>
          </tr>
          <tr class="collapsible">
          <td>5</td>
          <td colspan="4">diagnose_failures</td>
          </tr>
          <tr>
          <td></td>
          <td></td>
          <td class="content" colspan="3">
          <table>
          <tbody>
          <tr>
          <td>TESTCASE_ERRORS,CRITICAL_ERRORS,PATTERN_VAR,COVERAGE_VAR</td>
          <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/diagnose_failures-TESTCASE_ERRORS-CRITICAL_ERRORS-PATTERN_VAR-COVERAGE_VAR">1</a></td>
          <td> Rerun</td>
          </tr>
          </tbody>
          </table>
          </td>
          </tr>
          <tr class="collapsible">
          <td>6</td>
          <td colspan="4">verify_test_structures</td>
          </tr>
          <tr>
          <td></td>
          <td></td>
          <td class="content" colspan="3">
          <table>
          <tbody>
          <tr>
          <td>TESTCASE_ERRORS,MACHINE_ERROR,OTHER_INFO,WARNINGS,SEVERE,COVERAGE_VAR</td>
          <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/verify_test_structures-TESTCASE_ERRORS-MACHINE_ERROR-OTHER_INFO-WARNINGS-SEVERE-COVERAGE_VAR">1</a></td>
          <td> Open CCR</td>
          </tr>
          </tbody>
          </table>
          </td>
          </tr>
          <tr class="collapsible">
          <td>7</td>
          <td colspan="4">write_toggle_gram</td>
          </tr>
          <tr>
          <td></td>
          <td></td>
          <td class="content" colspan="3">
          <table>
          <tbody>
          <tr>
          <td>CORE</td>
          <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/write_toggle_gram-CORE">1</a></td>
          <td> Fix Testcase</td>
          </tr>
          </tbody>
          </table>
          </td>
          </tr>
          </tbody>
          </table>








          share|improve this answer





















          • Happy to help !
            – Kosh Very
            Nov 23 at 16:30



















          0














          https://jsfiddle.net/g4Lo92zb/



          I changed your HTML and JS.



          You can collapse a row that uses less code, and makes it look neater.



          Be sure when you set the display style property on your element, to set it to the valid display property value.



          table display: table;



          tr display: table-row;



          td display: table-cell;






          share|improve this answer





















            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53436077%2fproper-width-alignment-of-child-table-inside-parent-table-in-html%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            Here you are:






            $(".collapsible").click(function() {
            $(this).next('tr').toggle();
            });

            table {
            border-collapse: collapse;
            table-layout: fixed;
            width: 80%;
            margin: 0 auto;
            }

            th {
            border: solid 1px;
            }

            table td {
            border: solid 1px #fab;
            width: 100px;
            word-wrap: break-word;
            }

            table table {
            width: 100%;
            }


            /* Style the button that is used to open and close the collapsible content */

            .collapsible {
            cursor: pointer;
            padding: 18px;
            width: 100%;
            border: none;
            text-align: left;
            outline: none;
            font-size: 15px;
            }

            .collapsible+tr:not(:nth-child(2)) {
            display: none
            }


            /* Add a background color to the button if it is clicked on (add the .active class with JS), and when you move the mouse over it (hover) */

            .active,
            .collapsible:hover {
            background-color: #ccc;
            }


            /* Style the collapsible content. Note: hidden by default */

            .content {
            padding: 0;
            overflow: hidden;
            background-color: #f1f1f1;
            }

            <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
            <div class="w3-card w3-round w3-pink">
            <h1>
            <center>Regression Results</center>
            </h1>
            </div>
            <table>
            <thead>
            <tr class="w3-cyan">
            <th>S.no</th>
            <th>Command</th>
            <th>Failure Reasons</th>
            <th>Testcase Affected</th>
            <th>Response</th>
            </tr>
            </thead>
            <tbody>
            <tr class="collapsible">
            <td>1</td>
            <td colspan="4">build_model</td>
            </tr>
            <tr>
            <td></td>
            <td></td>
            <td class="content" colspan="3">
            <table>
            <tbody>
            <tr>
            <td>MACHINE_ERROR,OTHER_INFO,WARNINGS,PATTERN_VAR</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/build_model-MACHINE_ERROR-OTHER_INFO-WARNINGS-PATTERN_VAR">1</a></td>
            <td> Regold</td>
            </tr>
            </tbody>
            </table>
            </td>
            </tr>
            <tr class="collapsible">
            <td>2</td>
            <td colspan="4">build_testmode</td>
            </tr>
            <tr>
            <td></td>
            <td></td>
            <td class="content" colspan="3">
            <table>
            <tbody>
            <tr>
            <td>OTHER_INFO,COVERAGE_VAR</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/build_testmode-OTHER_INFO-COVERAGE_VAR">1</a></td>
            <td> Open CCR</td>
            </tr>
            <tr>
            <td>CORE,TESTCASE_ERRORS,CRITICAL_ERRORS,MACHINE_ERROR,PATTERN_VAR,COVERAGE_VAR</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/build_testmode-CORE-TESTCASE_ERRORS-CRITICAL_ERRORS-MACHINE_ERROR-PATTERN_VAR-COVERAGE_VAR">1</a></td>
            <td> Fix Testcase</td>
            </tr>
            </tbody>
            </table>
            </td>
            </tr>
            <tr class="collapsible">
            <td>3</td>
            <td colspan="4">commit_tests</td>
            </tr>
            <tr>
            <td></td>
            <td></td>
            <td class="content" colspan="3">
            <table>
            <tbody>
            <tr>
            <td>MACHINE_ERROR,WARNINGS</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/commit_tests-MACHINE_ERROR-WARNINGS">1</a></td>
            <td> Rerun</td>
            </tr>
            </tbody>
            </table>
            </td>
            </tr>
            <tr class="collapsible">
            <td>4</td>
            <td colspan="4">create_logic_tests</td>
            </tr>
            <tr>
            <td></td>
            <td></td>
            <td class="content" colspan="3">
            <table>
            <tbody>
            <tr>
            <td>CORE,OTHER_INFO,COVERAGE_VAR</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/create_logic_tests-CORE-OTHER_INFO-COVERAGE_VAR">1</a></td>
            <td> Regold</td>
            </tr>
            <tr>
            <td>CORE,CRITICAL_ERRORS,MACHINE_ERROR,OTHER_INFO,WARNINGS,SEVERE,PATTERN_VAR,COVERAGE_VAR</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/create_logic_tests-CORE-CRITICAL_ERRORS-MACHINE_ERROR-OTHER_INFO-WARNINGS-SEVERE-PATTERN_VAR-COVERAGE_VAR">1</a></td>
            <td> Rerun</td>
            </tr>
            </tbody>
            </table>
            </td>
            </tr>
            <tr class="collapsible">
            <td>5</td>
            <td colspan="4">diagnose_failures</td>
            </tr>
            <tr>
            <td></td>
            <td></td>
            <td class="content" colspan="3">
            <table>
            <tbody>
            <tr>
            <td>TESTCASE_ERRORS,CRITICAL_ERRORS,PATTERN_VAR,COVERAGE_VAR</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/diagnose_failures-TESTCASE_ERRORS-CRITICAL_ERRORS-PATTERN_VAR-COVERAGE_VAR">1</a></td>
            <td> Rerun</td>
            </tr>
            </tbody>
            </table>
            </td>
            </tr>
            <tr class="collapsible">
            <td>6</td>
            <td colspan="4">verify_test_structures</td>
            </tr>
            <tr>
            <td></td>
            <td></td>
            <td class="content" colspan="3">
            <table>
            <tbody>
            <tr>
            <td>TESTCASE_ERRORS,MACHINE_ERROR,OTHER_INFO,WARNINGS,SEVERE,COVERAGE_VAR</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/verify_test_structures-TESTCASE_ERRORS-MACHINE_ERROR-OTHER_INFO-WARNINGS-SEVERE-COVERAGE_VAR">1</a></td>
            <td> Open CCR</td>
            </tr>
            </tbody>
            </table>
            </td>
            </tr>
            <tr class="collapsible">
            <td>7</td>
            <td colspan="4">write_toggle_gram</td>
            </tr>
            <tr>
            <td></td>
            <td></td>
            <td class="content" colspan="3">
            <table>
            <tbody>
            <tr>
            <td>CORE</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/write_toggle_gram-CORE">1</a></td>
            <td> Fix Testcase</td>
            </tr>
            </tbody>
            </table>
            </td>
            </tr>
            </tbody>
            </table>








            share|improve this answer





















            • Happy to help !
              – Kosh Very
              Nov 23 at 16:30
















            0














            Here you are:






            $(".collapsible").click(function() {
            $(this).next('tr').toggle();
            });

            table {
            border-collapse: collapse;
            table-layout: fixed;
            width: 80%;
            margin: 0 auto;
            }

            th {
            border: solid 1px;
            }

            table td {
            border: solid 1px #fab;
            width: 100px;
            word-wrap: break-word;
            }

            table table {
            width: 100%;
            }


            /* Style the button that is used to open and close the collapsible content */

            .collapsible {
            cursor: pointer;
            padding: 18px;
            width: 100%;
            border: none;
            text-align: left;
            outline: none;
            font-size: 15px;
            }

            .collapsible+tr:not(:nth-child(2)) {
            display: none
            }


            /* Add a background color to the button if it is clicked on (add the .active class with JS), and when you move the mouse over it (hover) */

            .active,
            .collapsible:hover {
            background-color: #ccc;
            }


            /* Style the collapsible content. Note: hidden by default */

            .content {
            padding: 0;
            overflow: hidden;
            background-color: #f1f1f1;
            }

            <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
            <div class="w3-card w3-round w3-pink">
            <h1>
            <center>Regression Results</center>
            </h1>
            </div>
            <table>
            <thead>
            <tr class="w3-cyan">
            <th>S.no</th>
            <th>Command</th>
            <th>Failure Reasons</th>
            <th>Testcase Affected</th>
            <th>Response</th>
            </tr>
            </thead>
            <tbody>
            <tr class="collapsible">
            <td>1</td>
            <td colspan="4">build_model</td>
            </tr>
            <tr>
            <td></td>
            <td></td>
            <td class="content" colspan="3">
            <table>
            <tbody>
            <tr>
            <td>MACHINE_ERROR,OTHER_INFO,WARNINGS,PATTERN_VAR</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/build_model-MACHINE_ERROR-OTHER_INFO-WARNINGS-PATTERN_VAR">1</a></td>
            <td> Regold</td>
            </tr>
            </tbody>
            </table>
            </td>
            </tr>
            <tr class="collapsible">
            <td>2</td>
            <td colspan="4">build_testmode</td>
            </tr>
            <tr>
            <td></td>
            <td></td>
            <td class="content" colspan="3">
            <table>
            <tbody>
            <tr>
            <td>OTHER_INFO,COVERAGE_VAR</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/build_testmode-OTHER_INFO-COVERAGE_VAR">1</a></td>
            <td> Open CCR</td>
            </tr>
            <tr>
            <td>CORE,TESTCASE_ERRORS,CRITICAL_ERRORS,MACHINE_ERROR,PATTERN_VAR,COVERAGE_VAR</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/build_testmode-CORE-TESTCASE_ERRORS-CRITICAL_ERRORS-MACHINE_ERROR-PATTERN_VAR-COVERAGE_VAR">1</a></td>
            <td> Fix Testcase</td>
            </tr>
            </tbody>
            </table>
            </td>
            </tr>
            <tr class="collapsible">
            <td>3</td>
            <td colspan="4">commit_tests</td>
            </tr>
            <tr>
            <td></td>
            <td></td>
            <td class="content" colspan="3">
            <table>
            <tbody>
            <tr>
            <td>MACHINE_ERROR,WARNINGS</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/commit_tests-MACHINE_ERROR-WARNINGS">1</a></td>
            <td> Rerun</td>
            </tr>
            </tbody>
            </table>
            </td>
            </tr>
            <tr class="collapsible">
            <td>4</td>
            <td colspan="4">create_logic_tests</td>
            </tr>
            <tr>
            <td></td>
            <td></td>
            <td class="content" colspan="3">
            <table>
            <tbody>
            <tr>
            <td>CORE,OTHER_INFO,COVERAGE_VAR</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/create_logic_tests-CORE-OTHER_INFO-COVERAGE_VAR">1</a></td>
            <td> Regold</td>
            </tr>
            <tr>
            <td>CORE,CRITICAL_ERRORS,MACHINE_ERROR,OTHER_INFO,WARNINGS,SEVERE,PATTERN_VAR,COVERAGE_VAR</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/create_logic_tests-CORE-CRITICAL_ERRORS-MACHINE_ERROR-OTHER_INFO-WARNINGS-SEVERE-PATTERN_VAR-COVERAGE_VAR">1</a></td>
            <td> Rerun</td>
            </tr>
            </tbody>
            </table>
            </td>
            </tr>
            <tr class="collapsible">
            <td>5</td>
            <td colspan="4">diagnose_failures</td>
            </tr>
            <tr>
            <td></td>
            <td></td>
            <td class="content" colspan="3">
            <table>
            <tbody>
            <tr>
            <td>TESTCASE_ERRORS,CRITICAL_ERRORS,PATTERN_VAR,COVERAGE_VAR</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/diagnose_failures-TESTCASE_ERRORS-CRITICAL_ERRORS-PATTERN_VAR-COVERAGE_VAR">1</a></td>
            <td> Rerun</td>
            </tr>
            </tbody>
            </table>
            </td>
            </tr>
            <tr class="collapsible">
            <td>6</td>
            <td colspan="4">verify_test_structures</td>
            </tr>
            <tr>
            <td></td>
            <td></td>
            <td class="content" colspan="3">
            <table>
            <tbody>
            <tr>
            <td>TESTCASE_ERRORS,MACHINE_ERROR,OTHER_INFO,WARNINGS,SEVERE,COVERAGE_VAR</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/verify_test_structures-TESTCASE_ERRORS-MACHINE_ERROR-OTHER_INFO-WARNINGS-SEVERE-COVERAGE_VAR">1</a></td>
            <td> Open CCR</td>
            </tr>
            </tbody>
            </table>
            </td>
            </tr>
            <tr class="collapsible">
            <td>7</td>
            <td colspan="4">write_toggle_gram</td>
            </tr>
            <tr>
            <td></td>
            <td></td>
            <td class="content" colspan="3">
            <table>
            <tbody>
            <tr>
            <td>CORE</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/write_toggle_gram-CORE">1</a></td>
            <td> Fix Testcase</td>
            </tr>
            </tbody>
            </table>
            </td>
            </tr>
            </tbody>
            </table>








            share|improve this answer





















            • Happy to help !
              – Kosh Very
              Nov 23 at 16:30














            0












            0








            0






            Here you are:






            $(".collapsible").click(function() {
            $(this).next('tr').toggle();
            });

            table {
            border-collapse: collapse;
            table-layout: fixed;
            width: 80%;
            margin: 0 auto;
            }

            th {
            border: solid 1px;
            }

            table td {
            border: solid 1px #fab;
            width: 100px;
            word-wrap: break-word;
            }

            table table {
            width: 100%;
            }


            /* Style the button that is used to open and close the collapsible content */

            .collapsible {
            cursor: pointer;
            padding: 18px;
            width: 100%;
            border: none;
            text-align: left;
            outline: none;
            font-size: 15px;
            }

            .collapsible+tr:not(:nth-child(2)) {
            display: none
            }


            /* Add a background color to the button if it is clicked on (add the .active class with JS), and when you move the mouse over it (hover) */

            .active,
            .collapsible:hover {
            background-color: #ccc;
            }


            /* Style the collapsible content. Note: hidden by default */

            .content {
            padding: 0;
            overflow: hidden;
            background-color: #f1f1f1;
            }

            <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
            <div class="w3-card w3-round w3-pink">
            <h1>
            <center>Regression Results</center>
            </h1>
            </div>
            <table>
            <thead>
            <tr class="w3-cyan">
            <th>S.no</th>
            <th>Command</th>
            <th>Failure Reasons</th>
            <th>Testcase Affected</th>
            <th>Response</th>
            </tr>
            </thead>
            <tbody>
            <tr class="collapsible">
            <td>1</td>
            <td colspan="4">build_model</td>
            </tr>
            <tr>
            <td></td>
            <td></td>
            <td class="content" colspan="3">
            <table>
            <tbody>
            <tr>
            <td>MACHINE_ERROR,OTHER_INFO,WARNINGS,PATTERN_VAR</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/build_model-MACHINE_ERROR-OTHER_INFO-WARNINGS-PATTERN_VAR">1</a></td>
            <td> Regold</td>
            </tr>
            </tbody>
            </table>
            </td>
            </tr>
            <tr class="collapsible">
            <td>2</td>
            <td colspan="4">build_testmode</td>
            </tr>
            <tr>
            <td></td>
            <td></td>
            <td class="content" colspan="3">
            <table>
            <tbody>
            <tr>
            <td>OTHER_INFO,COVERAGE_VAR</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/build_testmode-OTHER_INFO-COVERAGE_VAR">1</a></td>
            <td> Open CCR</td>
            </tr>
            <tr>
            <td>CORE,TESTCASE_ERRORS,CRITICAL_ERRORS,MACHINE_ERROR,PATTERN_VAR,COVERAGE_VAR</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/build_testmode-CORE-TESTCASE_ERRORS-CRITICAL_ERRORS-MACHINE_ERROR-PATTERN_VAR-COVERAGE_VAR">1</a></td>
            <td> Fix Testcase</td>
            </tr>
            </tbody>
            </table>
            </td>
            </tr>
            <tr class="collapsible">
            <td>3</td>
            <td colspan="4">commit_tests</td>
            </tr>
            <tr>
            <td></td>
            <td></td>
            <td class="content" colspan="3">
            <table>
            <tbody>
            <tr>
            <td>MACHINE_ERROR,WARNINGS</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/commit_tests-MACHINE_ERROR-WARNINGS">1</a></td>
            <td> Rerun</td>
            </tr>
            </tbody>
            </table>
            </td>
            </tr>
            <tr class="collapsible">
            <td>4</td>
            <td colspan="4">create_logic_tests</td>
            </tr>
            <tr>
            <td></td>
            <td></td>
            <td class="content" colspan="3">
            <table>
            <tbody>
            <tr>
            <td>CORE,OTHER_INFO,COVERAGE_VAR</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/create_logic_tests-CORE-OTHER_INFO-COVERAGE_VAR">1</a></td>
            <td> Regold</td>
            </tr>
            <tr>
            <td>CORE,CRITICAL_ERRORS,MACHINE_ERROR,OTHER_INFO,WARNINGS,SEVERE,PATTERN_VAR,COVERAGE_VAR</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/create_logic_tests-CORE-CRITICAL_ERRORS-MACHINE_ERROR-OTHER_INFO-WARNINGS-SEVERE-PATTERN_VAR-COVERAGE_VAR">1</a></td>
            <td> Rerun</td>
            </tr>
            </tbody>
            </table>
            </td>
            </tr>
            <tr class="collapsible">
            <td>5</td>
            <td colspan="4">diagnose_failures</td>
            </tr>
            <tr>
            <td></td>
            <td></td>
            <td class="content" colspan="3">
            <table>
            <tbody>
            <tr>
            <td>TESTCASE_ERRORS,CRITICAL_ERRORS,PATTERN_VAR,COVERAGE_VAR</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/diagnose_failures-TESTCASE_ERRORS-CRITICAL_ERRORS-PATTERN_VAR-COVERAGE_VAR">1</a></td>
            <td> Rerun</td>
            </tr>
            </tbody>
            </table>
            </td>
            </tr>
            <tr class="collapsible">
            <td>6</td>
            <td colspan="4">verify_test_structures</td>
            </tr>
            <tr>
            <td></td>
            <td></td>
            <td class="content" colspan="3">
            <table>
            <tbody>
            <tr>
            <td>TESTCASE_ERRORS,MACHINE_ERROR,OTHER_INFO,WARNINGS,SEVERE,COVERAGE_VAR</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/verify_test_structures-TESTCASE_ERRORS-MACHINE_ERROR-OTHER_INFO-WARNINGS-SEVERE-COVERAGE_VAR">1</a></td>
            <td> Open CCR</td>
            </tr>
            </tbody>
            </table>
            </td>
            </tr>
            <tr class="collapsible">
            <td>7</td>
            <td colspan="4">write_toggle_gram</td>
            </tr>
            <tr>
            <td></td>
            <td></td>
            <td class="content" colspan="3">
            <table>
            <tbody>
            <tr>
            <td>CORE</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/write_toggle_gram-CORE">1</a></td>
            <td> Fix Testcase</td>
            </tr>
            </tbody>
            </table>
            </td>
            </tr>
            </tbody>
            </table>








            share|improve this answer












            Here you are:






            $(".collapsible").click(function() {
            $(this).next('tr').toggle();
            });

            table {
            border-collapse: collapse;
            table-layout: fixed;
            width: 80%;
            margin: 0 auto;
            }

            th {
            border: solid 1px;
            }

            table td {
            border: solid 1px #fab;
            width: 100px;
            word-wrap: break-word;
            }

            table table {
            width: 100%;
            }


            /* Style the button that is used to open and close the collapsible content */

            .collapsible {
            cursor: pointer;
            padding: 18px;
            width: 100%;
            border: none;
            text-align: left;
            outline: none;
            font-size: 15px;
            }

            .collapsible+tr:not(:nth-child(2)) {
            display: none
            }


            /* Add a background color to the button if it is clicked on (add the .active class with JS), and when you move the mouse over it (hover) */

            .active,
            .collapsible:hover {
            background-color: #ccc;
            }


            /* Style the collapsible content. Note: hidden by default */

            .content {
            padding: 0;
            overflow: hidden;
            background-color: #f1f1f1;
            }

            <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
            <div class="w3-card w3-round w3-pink">
            <h1>
            <center>Regression Results</center>
            </h1>
            </div>
            <table>
            <thead>
            <tr class="w3-cyan">
            <th>S.no</th>
            <th>Command</th>
            <th>Failure Reasons</th>
            <th>Testcase Affected</th>
            <th>Response</th>
            </tr>
            </thead>
            <tbody>
            <tr class="collapsible">
            <td>1</td>
            <td colspan="4">build_model</td>
            </tr>
            <tr>
            <td></td>
            <td></td>
            <td class="content" colspan="3">
            <table>
            <tbody>
            <tr>
            <td>MACHINE_ERROR,OTHER_INFO,WARNINGS,PATTERN_VAR</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/build_model-MACHINE_ERROR-OTHER_INFO-WARNINGS-PATTERN_VAR">1</a></td>
            <td> Regold</td>
            </tr>
            </tbody>
            </table>
            </td>
            </tr>
            <tr class="collapsible">
            <td>2</td>
            <td colspan="4">build_testmode</td>
            </tr>
            <tr>
            <td></td>
            <td></td>
            <td class="content" colspan="3">
            <table>
            <tbody>
            <tr>
            <td>OTHER_INFO,COVERAGE_VAR</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/build_testmode-OTHER_INFO-COVERAGE_VAR">1</a></td>
            <td> Open CCR</td>
            </tr>
            <tr>
            <td>CORE,TESTCASE_ERRORS,CRITICAL_ERRORS,MACHINE_ERROR,PATTERN_VAR,COVERAGE_VAR</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/build_testmode-CORE-TESTCASE_ERRORS-CRITICAL_ERRORS-MACHINE_ERROR-PATTERN_VAR-COVERAGE_VAR">1</a></td>
            <td> Fix Testcase</td>
            </tr>
            </tbody>
            </table>
            </td>
            </tr>
            <tr class="collapsible">
            <td>3</td>
            <td colspan="4">commit_tests</td>
            </tr>
            <tr>
            <td></td>
            <td></td>
            <td class="content" colspan="3">
            <table>
            <tbody>
            <tr>
            <td>MACHINE_ERROR,WARNINGS</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/commit_tests-MACHINE_ERROR-WARNINGS">1</a></td>
            <td> Rerun</td>
            </tr>
            </tbody>
            </table>
            </td>
            </tr>
            <tr class="collapsible">
            <td>4</td>
            <td colspan="4">create_logic_tests</td>
            </tr>
            <tr>
            <td></td>
            <td></td>
            <td class="content" colspan="3">
            <table>
            <tbody>
            <tr>
            <td>CORE,OTHER_INFO,COVERAGE_VAR</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/create_logic_tests-CORE-OTHER_INFO-COVERAGE_VAR">1</a></td>
            <td> Regold</td>
            </tr>
            <tr>
            <td>CORE,CRITICAL_ERRORS,MACHINE_ERROR,OTHER_INFO,WARNINGS,SEVERE,PATTERN_VAR,COVERAGE_VAR</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/create_logic_tests-CORE-CRITICAL_ERRORS-MACHINE_ERROR-OTHER_INFO-WARNINGS-SEVERE-PATTERN_VAR-COVERAGE_VAR">1</a></td>
            <td> Rerun</td>
            </tr>
            </tbody>
            </table>
            </td>
            </tr>
            <tr class="collapsible">
            <td>5</td>
            <td colspan="4">diagnose_failures</td>
            </tr>
            <tr>
            <td></td>
            <td></td>
            <td class="content" colspan="3">
            <table>
            <tbody>
            <tr>
            <td>TESTCASE_ERRORS,CRITICAL_ERRORS,PATTERN_VAR,COVERAGE_VAR</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/diagnose_failures-TESTCASE_ERRORS-CRITICAL_ERRORS-PATTERN_VAR-COVERAGE_VAR">1</a></td>
            <td> Rerun</td>
            </tr>
            </tbody>
            </table>
            </td>
            </tr>
            <tr class="collapsible">
            <td>6</td>
            <td colspan="4">verify_test_structures</td>
            </tr>
            <tr>
            <td></td>
            <td></td>
            <td class="content" colspan="3">
            <table>
            <tbody>
            <tr>
            <td>TESTCASE_ERRORS,MACHINE_ERROR,OTHER_INFO,WARNINGS,SEVERE,COVERAGE_VAR</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/verify_test_structures-TESTCASE_ERRORS-MACHINE_ERROR-OTHER_INFO-WARNINGS-SEVERE-COVERAGE_VAR">1</a></td>
            <td> Open CCR</td>
            </tr>
            </tbody>
            </table>
            </td>
            </tr>
            <tr class="collapsible">
            <td>7</td>
            <td colspan="4">write_toggle_gram</td>
            </tr>
            <tr>
            <td></td>
            <td></td>
            <td class="content" colspan="3">
            <table>
            <tbody>
            <tr>
            <td>CORE</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/write_toggle_gram-CORE">1</a></td>
            <td> Fix Testcase</td>
            </tr>
            </tbody>
            </table>
            </td>
            </tr>
            </tbody>
            </table>








            $(".collapsible").click(function() {
            $(this).next('tr').toggle();
            });

            table {
            border-collapse: collapse;
            table-layout: fixed;
            width: 80%;
            margin: 0 auto;
            }

            th {
            border: solid 1px;
            }

            table td {
            border: solid 1px #fab;
            width: 100px;
            word-wrap: break-word;
            }

            table table {
            width: 100%;
            }


            /* Style the button that is used to open and close the collapsible content */

            .collapsible {
            cursor: pointer;
            padding: 18px;
            width: 100%;
            border: none;
            text-align: left;
            outline: none;
            font-size: 15px;
            }

            .collapsible+tr:not(:nth-child(2)) {
            display: none
            }


            /* Add a background color to the button if it is clicked on (add the .active class with JS), and when you move the mouse over it (hover) */

            .active,
            .collapsible:hover {
            background-color: #ccc;
            }


            /* Style the collapsible content. Note: hidden by default */

            .content {
            padding: 0;
            overflow: hidden;
            background-color: #f1f1f1;
            }

            <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
            <div class="w3-card w3-round w3-pink">
            <h1>
            <center>Regression Results</center>
            </h1>
            </div>
            <table>
            <thead>
            <tr class="w3-cyan">
            <th>S.no</th>
            <th>Command</th>
            <th>Failure Reasons</th>
            <th>Testcase Affected</th>
            <th>Response</th>
            </tr>
            </thead>
            <tbody>
            <tr class="collapsible">
            <td>1</td>
            <td colspan="4">build_model</td>
            </tr>
            <tr>
            <td></td>
            <td></td>
            <td class="content" colspan="3">
            <table>
            <tbody>
            <tr>
            <td>MACHINE_ERROR,OTHER_INFO,WARNINGS,PATTERN_VAR</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/build_model-MACHINE_ERROR-OTHER_INFO-WARNINGS-PATTERN_VAR">1</a></td>
            <td> Regold</td>
            </tr>
            </tbody>
            </table>
            </td>
            </tr>
            <tr class="collapsible">
            <td>2</td>
            <td colspan="4">build_testmode</td>
            </tr>
            <tr>
            <td></td>
            <td></td>
            <td class="content" colspan="3">
            <table>
            <tbody>
            <tr>
            <td>OTHER_INFO,COVERAGE_VAR</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/build_testmode-OTHER_INFO-COVERAGE_VAR">1</a></td>
            <td> Open CCR</td>
            </tr>
            <tr>
            <td>CORE,TESTCASE_ERRORS,CRITICAL_ERRORS,MACHINE_ERROR,PATTERN_VAR,COVERAGE_VAR</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/build_testmode-CORE-TESTCASE_ERRORS-CRITICAL_ERRORS-MACHINE_ERROR-PATTERN_VAR-COVERAGE_VAR">1</a></td>
            <td> Fix Testcase</td>
            </tr>
            </tbody>
            </table>
            </td>
            </tr>
            <tr class="collapsible">
            <td>3</td>
            <td colspan="4">commit_tests</td>
            </tr>
            <tr>
            <td></td>
            <td></td>
            <td class="content" colspan="3">
            <table>
            <tbody>
            <tr>
            <td>MACHINE_ERROR,WARNINGS</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/commit_tests-MACHINE_ERROR-WARNINGS">1</a></td>
            <td> Rerun</td>
            </tr>
            </tbody>
            </table>
            </td>
            </tr>
            <tr class="collapsible">
            <td>4</td>
            <td colspan="4">create_logic_tests</td>
            </tr>
            <tr>
            <td></td>
            <td></td>
            <td class="content" colspan="3">
            <table>
            <tbody>
            <tr>
            <td>CORE,OTHER_INFO,COVERAGE_VAR</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/create_logic_tests-CORE-OTHER_INFO-COVERAGE_VAR">1</a></td>
            <td> Regold</td>
            </tr>
            <tr>
            <td>CORE,CRITICAL_ERRORS,MACHINE_ERROR,OTHER_INFO,WARNINGS,SEVERE,PATTERN_VAR,COVERAGE_VAR</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/create_logic_tests-CORE-CRITICAL_ERRORS-MACHINE_ERROR-OTHER_INFO-WARNINGS-SEVERE-PATTERN_VAR-COVERAGE_VAR">1</a></td>
            <td> Rerun</td>
            </tr>
            </tbody>
            </table>
            </td>
            </tr>
            <tr class="collapsible">
            <td>5</td>
            <td colspan="4">diagnose_failures</td>
            </tr>
            <tr>
            <td></td>
            <td></td>
            <td class="content" colspan="3">
            <table>
            <tbody>
            <tr>
            <td>TESTCASE_ERRORS,CRITICAL_ERRORS,PATTERN_VAR,COVERAGE_VAR</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/diagnose_failures-TESTCASE_ERRORS-CRITICAL_ERRORS-PATTERN_VAR-COVERAGE_VAR">1</a></td>
            <td> Rerun</td>
            </tr>
            </tbody>
            </table>
            </td>
            </tr>
            <tr class="collapsible">
            <td>6</td>
            <td colspan="4">verify_test_structures</td>
            </tr>
            <tr>
            <td></td>
            <td></td>
            <td class="content" colspan="3">
            <table>
            <tbody>
            <tr>
            <td>TESTCASE_ERRORS,MACHINE_ERROR,OTHER_INFO,WARNINGS,SEVERE,COVERAGE_VAR</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/verify_test_structures-TESTCASE_ERRORS-MACHINE_ERROR-OTHER_INFO-WARNINGS-SEVERE-COVERAGE_VAR">1</a></td>
            <td> Open CCR</td>
            </tr>
            </tbody>
            </table>
            </td>
            </tr>
            <tr class="collapsible">
            <td>7</td>
            <td colspan="4">write_toggle_gram</td>
            </tr>
            <tr>
            <td></td>
            <td></td>
            <td class="content" colspan="3">
            <table>
            <tbody>
            <tr>
            <td>CORE</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/write_toggle_gram-CORE">1</a></td>
            <td> Fix Testcase</td>
            </tr>
            </tbody>
            </table>
            </td>
            </tr>
            </tbody>
            </table>





            $(".collapsible").click(function() {
            $(this).next('tr').toggle();
            });

            table {
            border-collapse: collapse;
            table-layout: fixed;
            width: 80%;
            margin: 0 auto;
            }

            th {
            border: solid 1px;
            }

            table td {
            border: solid 1px #fab;
            width: 100px;
            word-wrap: break-word;
            }

            table table {
            width: 100%;
            }


            /* Style the button that is used to open and close the collapsible content */

            .collapsible {
            cursor: pointer;
            padding: 18px;
            width: 100%;
            border: none;
            text-align: left;
            outline: none;
            font-size: 15px;
            }

            .collapsible+tr:not(:nth-child(2)) {
            display: none
            }


            /* Add a background color to the button if it is clicked on (add the .active class with JS), and when you move the mouse over it (hover) */

            .active,
            .collapsible:hover {
            background-color: #ccc;
            }


            /* Style the collapsible content. Note: hidden by default */

            .content {
            padding: 0;
            overflow: hidden;
            background-color: #f1f1f1;
            }

            <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
            <div class="w3-card w3-round w3-pink">
            <h1>
            <center>Regression Results</center>
            </h1>
            </div>
            <table>
            <thead>
            <tr class="w3-cyan">
            <th>S.no</th>
            <th>Command</th>
            <th>Failure Reasons</th>
            <th>Testcase Affected</th>
            <th>Response</th>
            </tr>
            </thead>
            <tbody>
            <tr class="collapsible">
            <td>1</td>
            <td colspan="4">build_model</td>
            </tr>
            <tr>
            <td></td>
            <td></td>
            <td class="content" colspan="3">
            <table>
            <tbody>
            <tr>
            <td>MACHINE_ERROR,OTHER_INFO,WARNINGS,PATTERN_VAR</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/build_model-MACHINE_ERROR-OTHER_INFO-WARNINGS-PATTERN_VAR">1</a></td>
            <td> Regold</td>
            </tr>
            </tbody>
            </table>
            </td>
            </tr>
            <tr class="collapsible">
            <td>2</td>
            <td colspan="4">build_testmode</td>
            </tr>
            <tr>
            <td></td>
            <td></td>
            <td class="content" colspan="3">
            <table>
            <tbody>
            <tr>
            <td>OTHER_INFO,COVERAGE_VAR</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/build_testmode-OTHER_INFO-COVERAGE_VAR">1</a></td>
            <td> Open CCR</td>
            </tr>
            <tr>
            <td>CORE,TESTCASE_ERRORS,CRITICAL_ERRORS,MACHINE_ERROR,PATTERN_VAR,COVERAGE_VAR</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/build_testmode-CORE-TESTCASE_ERRORS-CRITICAL_ERRORS-MACHINE_ERROR-PATTERN_VAR-COVERAGE_VAR">1</a></td>
            <td> Fix Testcase</td>
            </tr>
            </tbody>
            </table>
            </td>
            </tr>
            <tr class="collapsible">
            <td>3</td>
            <td colspan="4">commit_tests</td>
            </tr>
            <tr>
            <td></td>
            <td></td>
            <td class="content" colspan="3">
            <table>
            <tbody>
            <tr>
            <td>MACHINE_ERROR,WARNINGS</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/commit_tests-MACHINE_ERROR-WARNINGS">1</a></td>
            <td> Rerun</td>
            </tr>
            </tbody>
            </table>
            </td>
            </tr>
            <tr class="collapsible">
            <td>4</td>
            <td colspan="4">create_logic_tests</td>
            </tr>
            <tr>
            <td></td>
            <td></td>
            <td class="content" colspan="3">
            <table>
            <tbody>
            <tr>
            <td>CORE,OTHER_INFO,COVERAGE_VAR</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/create_logic_tests-CORE-OTHER_INFO-COVERAGE_VAR">1</a></td>
            <td> Regold</td>
            </tr>
            <tr>
            <td>CORE,CRITICAL_ERRORS,MACHINE_ERROR,OTHER_INFO,WARNINGS,SEVERE,PATTERN_VAR,COVERAGE_VAR</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/create_logic_tests-CORE-CRITICAL_ERRORS-MACHINE_ERROR-OTHER_INFO-WARNINGS-SEVERE-PATTERN_VAR-COVERAGE_VAR">1</a></td>
            <td> Rerun</td>
            </tr>
            </tbody>
            </table>
            </td>
            </tr>
            <tr class="collapsible">
            <td>5</td>
            <td colspan="4">diagnose_failures</td>
            </tr>
            <tr>
            <td></td>
            <td></td>
            <td class="content" colspan="3">
            <table>
            <tbody>
            <tr>
            <td>TESTCASE_ERRORS,CRITICAL_ERRORS,PATTERN_VAR,COVERAGE_VAR</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/diagnose_failures-TESTCASE_ERRORS-CRITICAL_ERRORS-PATTERN_VAR-COVERAGE_VAR">1</a></td>
            <td> Rerun</td>
            </tr>
            </tbody>
            </table>
            </td>
            </tr>
            <tr class="collapsible">
            <td>6</td>
            <td colspan="4">verify_test_structures</td>
            </tr>
            <tr>
            <td></td>
            <td></td>
            <td class="content" colspan="3">
            <table>
            <tbody>
            <tr>
            <td>TESTCASE_ERRORS,MACHINE_ERROR,OTHER_INFO,WARNINGS,SEVERE,COVERAGE_VAR</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/verify_test_structures-TESTCASE_ERRORS-MACHINE_ERROR-OTHER_INFO-WARNINGS-SEVERE-COVERAGE_VAR">1</a></td>
            <td> Open CCR</td>
            </tr>
            </tbody>
            </table>
            </td>
            </tr>
            <tr class="collapsible">
            <td>7</td>
            <td colspan="4">write_toggle_gram</td>
            </tr>
            <tr>
            <td></td>
            <td></td>
            <td class="content" colspan="3">
            <table>
            <tbody>
            <tr>
            <td>CORE</td>
            <td><a href="http://etpv/servers/scratch05/gpreeti/python/practice/tc_files1/write_toggle_gram-CORE">1</a></td>
            <td> Fix Testcase</td>
            </tr>
            </tbody>
            </table>
            </td>
            </tr>
            </tbody>
            </table>






            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Nov 22 at 19:40









            Kosh Very

            10k1823




            10k1823












            • Happy to help !
              – Kosh Very
              Nov 23 at 16:30


















            • Happy to help !
              – Kosh Very
              Nov 23 at 16:30
















            Happy to help !
            – Kosh Very
            Nov 23 at 16:30




            Happy to help !
            – Kosh Very
            Nov 23 at 16:30













            0














            https://jsfiddle.net/g4Lo92zb/



            I changed your HTML and JS.



            You can collapse a row that uses less code, and makes it look neater.



            Be sure when you set the display style property on your element, to set it to the valid display property value.



            table display: table;



            tr display: table-row;



            td display: table-cell;






            share|improve this answer


























              0














              https://jsfiddle.net/g4Lo92zb/



              I changed your HTML and JS.



              You can collapse a row that uses less code, and makes it look neater.



              Be sure when you set the display style property on your element, to set it to the valid display property value.



              table display: table;



              tr display: table-row;



              td display: table-cell;






              share|improve this answer
























                0












                0








                0






                https://jsfiddle.net/g4Lo92zb/



                I changed your HTML and JS.



                You can collapse a row that uses less code, and makes it look neater.



                Be sure when you set the display style property on your element, to set it to the valid display property value.



                table display: table;



                tr display: table-row;



                td display: table-cell;






                share|improve this answer












                https://jsfiddle.net/g4Lo92zb/



                I changed your HTML and JS.



                You can collapse a row that uses less code, and makes it look neater.



                Be sure when you set the display style property on your element, to set it to the valid display property value.



                table display: table;



                tr display: table-row;



                td display: table-cell;







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 22 at 19:05









                Marius

                867




                867






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53436077%2fproper-width-alignment-of-child-table-inside-parent-table-in-html%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks

                    Calculate evaluation metrics using cross_val_predict sklearn

                    Insert data from modal to MySQL (multiple modal on website)