I am quite new in bootstrap, so I am sorry if my question is too simple.
I want to create a table that has a width as the parent container, fixed height and scroll bar if the table contains too many rows.
I have tried to do it like this:
<table class="table">
<tbody style="height: 80px; overflow-y: auto;">
<tr><td>1</td></tr>
<tr><td>2</td></tr>
<tr><td>3</td></tr>
<tr><td>4</td></tr>
</tbody>
</table>
It displays full table with full width but without scrolling and the height is bigger than I need.
Also I've tried to add display: block;:
<table class="table">
<tbody style="height: 80px; display: block; overflow-y: auto;">
<tr><td>1</td></tr>
<tr><td>2</td></tr>
<tr><td>3</td></tr>
<tr><td>4</td></tr>
</tbody>
</table>
In this case the scroll bar appeared but the width of tr-tag doesn't fit the container, it's much shorter.
I have also tried to specify width=100% to tr and td tags without a luck. How am I supposed to solve my task?