I want to add a vertical and horizontal scroll bar to the table with fixed header. By using thead
and tbody
tags I could add scrollbar in firefox but IE does not support the overflow:auto property
in tbody
. IE8 does not support css expressions so can you tell me how to accomplish this?
Suppose we want to add a scroll bar option in HTML, use an “overflow” option and set it as auto-enabled for adding both horizontal and vertical scroll bars. If we want to add a vertical bar option in Html, add the line “overflow-y” in the files.
Basic Horizontal Scroll Box To make a scroll box with a horizontal scroll, you need to use the overflow-x property. Specifically, you need to use this code: overflow-x:scroll; . This tells your browser to create scroll bars on the x (horizontal) axis, whenever the contents of the container is too wide.
with CSS it should be easy
div.scrollWrapper{
height:250px;
width:200px;
overflow:scroll;
}
<div class="scrollWrapper">
<table >
<tbody height="xxx">
<tr>......
</tbody>
</table>
</div>
On giving fixed height also that is not working in IE. The height is getting applied to tr
which I gave to tbody
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With