How can I make the horizontal scrollbar for a DIV always appear fixed on the bottom of the page?

后端 未结 3 1027
太阳男子
太阳男子 2020-12-17 23:17

I have a website which contains a large (and wide) table. The table is placed inside jquery UI tabs.

It looks something like this: http://jsfiddle.net/Tq3Rg/

相关标签:
3条回答
  • 2020-12-17 23:22

    Set a fixed height (and don't use inline-styles):

    Your altered Demo

    the code:

    .top{
       height:10%;
    }
    .center{
       overflow:scroll;
       height:80%;
    }
    .bottom{
       height:10%;
    }
    

    If you really want to have the scrollbars at the very bottom of your page, you could check this answer on how to achieve this without needing custom scrollbars and such stuff.

    0 讨论(0)
  • 2020-12-17 23:25

    You need a custom scrollbar to do this, have a look http://baijs.nl/tinyscrollbar/ or http://www.jquery4u.com/plugins/10-jquery-custom-scrollbar-plugins/#.T_RSYxEe4hU.

    0 讨论(0)
  • 2020-12-17 23:26

    Just set some fixed height to your middle div like

    <div style="background:white;overflow-y:scroll;height:400px;">
    
    0 讨论(0)
提交回复
热议问题