I want to create table with fixed header. And scroll tbody left and down. If I do thead and tbody as blocks (set style display:block and pos开发者_如何学运维ition:relative) it works for me in all browsers except IE. For IE I need to set position:fixed. But if I use position:fixed after dynamically adding new row the scroll position is reset.
Example: http://jsfiddle.net/9nezW/33/
How can I make tbody scrollable with use position:relative in IE?
Thanks
Try setting overflow: auto in the tbody's css.
An example I found here: http://monolinea.com/clients/csstests/tablescroll.html has a table that works in IE, still trying to figure out the differences between mine and theirs. May help you to take a look at it's source.
精彩评论