开发者

Make tbody scrollable with use position:relative in IE

开发者 https://www.devze.com 2023-03-25 13:45 出处:网络
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 brow

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消