How to make jQuery UI tabs appear at the bottom of a page

后端 未结 3 436
生来不讨喜
生来不讨喜 2021-01-13 17:15

Is there some way to make the jQuery UI tab widget tabs appear at the bottom of a page? Using the example from the jQuery site:




        
相关标签:
3条回答
  • 2021-01-13 17:38

    Have you tried using CSS to move the tabs under the content area? I think thats what you are going for.

    0 讨论(0)
  • 2021-01-13 17:45

    Unfortunately the 'tabs below content' example is no longer present in the jQuery documentation, so you can use the following CSS to reposition your jQuery UI tab controls:

    #tabs { 
        position: relative; 
        padding-bottom: 3em; 
    } 
    #tabs .ui-tabs-nav { 
        position: absolute; 
        left: 0.25em; 
        right: 0.25em; 
        bottom: 0.25em; 
        padding: 0em 0.2em 0.2em; 
    } 
    #tabs .ui-tabs-nav li { 
        border-top: none; 
        border-bottom: 1px solid #ccc; 
        -moz-border-radius: 0px 0px 4px 4px; 
        -webkit-border-radius: 0px 0px 4px 4px; 
        border-radius: 0px 0px 4px 4px; 
    } 
    #tabs .ui-tabs-nav li.ui-tabs-selected, 
    #tabs .ui-tabs-nav li.ui-state-active { 
        top: -1px; 
    }
    

    This will position the tabs on the bottom on your #tabs container. If you want to keep a static height you can give your #tabs container a height value.

    Note: the above CSS was adapted from Keith Wood's example.

    0 讨论(0)
  • 2021-01-13 17:47

    In jquery UI 1.10.0 after changing order of list - it should be at the bottom of tab outline div, everything works perfect:

    <div id="tabs">
            <div id="tabs-1">
    
            </div>
            <div id="tabs-2">
    
            </div>
            <ul>
                <li><a href="#tabs-1">Tab1</a></li>
                <li><a href="#tabs-2">Tab2</a></li>
            </ul>
        </div>
    
    0 讨论(0)
提交回复
热议问题