1

First up, I know this question is probably asked several times, but everyone's layout is different!

I have a mapping application and with a left side tool bar. This tool bar has jquery tabs. I cant get a scroll bar on these tabs. even after overloading .ui-tabs-panel. I know just by adding a height:somepx here gives me scroll bars, but thats not what i want. I want the height to be always till all the way down. I have tried several things but nothing works :(

I suspect its because of my other layout properties which are there to keep the layout liquid (make map adjust to screen sizes and keep left side bar constant).

Here is the stripped down version in Jsbin:

http://jsbin.com/exeguw/edit#source

Can some one please help me get the vertical scroll bar?

Thanks!

2 Answers 2

1

If you set the tab div to the height of the #map div (adjusted for tab headers) after the tabs are created, then overflow will kick in and make the contents scrollable:

javascript:

function ResizeTabs() { 
   $("div.scroll-tab").height($("#map").height() - 80);
}

$(function() {
   $(window).resize(ResizeTabs);
   $('#tabs').tabs({
     create: ResizeTabs
   });
});

Updated jsBin.

EDIT: now handles window resizing as well!

Sign up to request clarification or add additional context in comments.

2 Comments

+1 for a great solution! but this only works one time! If the browser is resized the scroll bar goes under the footer and disappears.
Updated the code to handle window resizing - I have had to do this recently, so I already had a resizing solution.
1

Try this http://jsbin.com/exeguw/9/edit#javascript,html,live

1 Comment

that shows me scroll bars, but It will scroll the tabs out of view too. I want the tabs to be seen always and just the contents scrolled.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.