0

This is the code. I've tried with overflow:scroll , and i'm pretty sure that, that's the piece of code what i'm looking for, but the same error occurs. Can someone help me?

This a simple bootstrap table. Unfortunately the solutions a have tried did not work out.

.stavre
{
 table-layout: fixed;
height: 200px;
}

.stavre table  {
     padding: 5px;
    border: 1px solid #eee;
    width: 100px;
    word-wrap: break-word;
    overflow: scroll;
}


.stavre table {
    height: 200px;

}
</style>

</head>
<body>

<div class= "container">


<div class="stavre">
<table class="table-responsive table table-bordered">

      <tr>
        <th>Firstname</th>
        <th>Lastname</th>
        <th>Email</th>
      </tr>

      <tr>
        <td>John</td>
        <td>Doe</td>
        <td>john@example.com</td>
      </tr>
      <tr>
        <td>Mary</td>
        <td>Moe</td>
        <td>mary@example.com</td>
      </tr>
      <tr>
        <tr>
        <td>July</td>
        <td>Dooley</td>
        <td>july@example.com</td>
        </tr>
        <tr>
        <td>Tomi</td>
        <td>Nane</td>
        <td>Tomi@example.com</td>
        </tr>
        <tr>
        <td>Miro</td>
        <td>Jovanovski</td>
        <td>Miro@example.com</td>
        </tr>
        <tr>
        <td>Dragi</td>
        <td>Kostovski</td>
        <td>Dragi@example.com</td>
        </tr>


      </tr>

    </table>

</div>

<div>


</body>
</head>
</html>
Mykola
  • 3,343
  • 6
  • 23
  • 39
Tomi
  • 45
  • 6

1 Answers1

0

You could try putting max-height on the stavre class, so when it exceeds the height specified it automatically shows the scroll bar.

ERushforth
  • 186
  • 2
  • 6
  • 17