How to make in html table with scrolling bar? That is, a table with, for example, 10 fields is initially visible. And to see others, you need to scroll through the scrollbar. Tell me how to implement it?

I tried to shove in textrea - but the nonsense turned out.

    3 answers 3

    <div style="height:100px;overflow-y:scroll;"> <!-- Тут должна быть ваша таблица --> </div> 

      The option above is also not bad, but would do so:

       <div class="scroll"> <p></p> <!--или любой другой тэг--> </div> 

       /* scroll start*/ .scroll { width: 100px; height: 100px; overflow: auto; } /* scroll end*/ 

      Why auto? In my opinion it is better to make a fixed block, both in height and in width. After all, you will insert it somewhere. overflow: scroll; will also give a scroll below, IMHO, this is wrong and it looks a little wrong on the site. Although everyone's business!

      • one
        @nosensus overflow-y , no, not heard .. - FLK

      Here 's a scrolling in HTML.