开发者

jQuery UI Tabs: Set Tabs to full page size

开发者 https://www.devze.com 2023-04-05 12:25 出处:网络
I thought this would be a simple project but it looks like it\'s a lot more complicated. Searched bo I\'m trying to create jQuery UI tabs that take up the whole page. So the width and height of the ta

I thought this would be a simple project but it looks like it's a lot more complicated. Searched bo I'm trying to create jQuery UI tabs that take up the whole page. So the width and height of the tabs should be set to the size of the browser.

Can anyone sugge开发者_如何学JAVAst any examples or tutorial on doing this using jQuery UI tabs?


Using the http://jqueryui.com/demos/tabs/ tabs, there is a top-level <div> block enclosing the list that defines the tabs and a <div> for each tab, like:

<div id="tabs">
    <ul>
        <li><a href="#tabs-1">Tab 1</a></li>
        <li><a href="#tabs-2">Tab 2</a></li>
    </ul>
    <div id="tabs-1">Tab 1 Content HERE</div>
    <div id="tabs-2">Tab 2 Content HERE</div>
</div>

To set the size of the tab widget, add style (attribute or css) to the top <div>:

<div id="tabs" style="width:100%; height:100%">

Exactly what style you should apply will depend on your desired page layout.

0

精彩评论

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