Skip to content Skip to sidebar Skip to footer

Table Tbody Scroll In Ie8

In my project, I am trying to make the tbody scroll in IE8. I know it can be scrolled by just giving overflow: auto to tbody. But this doesn't work in IE8. To make it work in IE8,

Solution 1:

I found two ways to solve this problem in IE8.

       1)   Adding extra td element of width: 0px to tr's of thead and tbody.

IE8 demo

       2)   Adding a hidden letter to content of after pseudo selector.

tr:after{
        content: ".";
        visibility: hidden;
    }

I added the above in conditional css. because the problem was only in IE8. (I haven't tested in IE9+)

<!--[if IE 8]>
         <style>
             /* the above css code here */
         </style>
    <![endif]-->

IE8 demo

I used the latter one because it is simple.

Post a Comment for "Table Tbody Scroll In Ie8"