How to set tbody height with overflow scroll

Basically before I achieved the result I needed I had tried other methods to get the job done, until i came across this particular method.I really would recommend this method to you, after trying various ways/methods.

if you want tbody to show a scroll , turn it into a block. To keep behavior of table , turn tr into table. to spray evenly the cells , use table-layout:fixed; and you will be able to achieve the tbody height with overflow scroll.Below is a DEMO to achieve that.

HTML:

<h3>Table A</h3>
<table >
    <thead>
        <tr>
            <td>Name</td>
            <td>phone</td>a
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>AAAA</td>
            <td>323232</td>
        </tr>
        <tr>
            <td>BBBBB</td>
            <td>323232</td>
        </tr>
        <tr>
            <td>CCCCC</td>
            <td>3435656</td>
        </tr>
    </tbody>
</table>
<hr/>
<h3>Table B</h3>
<table >
    <thead>
        <tr>
            <td>Name</td>
            <td>phone</td>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>AAAA</td>
            <td>323232</td>
        </tr>
        <tr>
            <td>BBBBB</td>
            <td>323232</td>
        </tr>
        <tr>
            <td>CCCCC</td>
            <td>3435656</td>
        </tr>
    </tbody>
</table>

CSS:

table ,tr td{
    border:1px solid red
}
tbody {
    display:block;
    height:50px;
    overflow:auto;
}
thead, tbody tr {
    display:table;
    width:100%;
    table-layout:fixed;
}
thead {
    width: calc( 100% - 1em )
}
table {
    width:400px;
}

I hope this was helpful,