开发者

jQuery Tools - Vertical Tabs possible?

I am using jQuery Tools tabs across my site, and want vertical tabs, not horizontal tabs. I know jQuery UI tabs can do this, as well as other plugins, but I want to stick with jQuery Tools tabs.

Specifically, I am trying to take this: http://flowplayer.org/tools/demos/tabs/skin4.htm and do two things.

1) M开发者_如何学运维ake the tabs vertical on the left side 2) Ensure that the panel height will change to show all of that tab's content

This seems to be impossible when using absolute positioning and crossfading? I'd be more than happy to give up crossfading to get this working! I went through the docs and couldn't find anything either.


The second part of your question requires some Javascript/jQuery to adjust the height according to the height of the current #panes div as they are absolutely positioned and so outside of the normal DOM flow. Thus, setting height:auto on #panes won't work.

However, the first part of your question can be accomplished with simple CSS, changing the demo page you provided so that:

#panes     { width:XXXpx; float:right; }
#nav       { width:YYYpx; }
#nav ul    { width:YYYpx; float:left; margin:0; padding:0; }
#nav ul li { width:YYYpx; display:block; margin:0; padding:0; } /* no float! */

XXXpx and YYYpx will add up to the width of the parent wrapper, so that the floats work properly and don't wrap.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜