Note that there are some explanatory texts on larger screens.

plurals
  1. POjQueryUI Tabs inside jQueryUI Dialog -- how do I get a scrollbar for the tab-content only, rather than the entire dialog box?
    primarykey
    data
    text
    <p>I'm using jQueryUI Tabs inside a jQueryUI Dialog box. The content in each of the tab panels can be quite large -- for example there can be a table with hundreds of rows inside each individual tab panel. So scrollbars are required to navigate the content.</p> <p>By default, the dialog panel displays its own scrollbar -- which is not exactly what I want. This scrollbar causes the navigation tabs themselves to move up and out of view. What I'd prefer is for each tab panel to display its own scrollbar if necessary but to leave the navigation tabs visible. I've tried setting "overflow:hidden" for the dialog panel, and then "overflow:auto" for the individual tab panels (see below). But then the tab panels are not getting scrollbars even when the content requires it.</p> <p>Below is a (reduced) test case that shows the problem -- including my attempt to use overflow styles to solve the problem. Replace "Big content..." with something that causes scrollbars to be required and you'll see it.</p> <p>Hope that's clear enough. Any ideas on how to solve this problem? Many thanks...</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/smoothness/jquery-ui.css" rel="stylesheet" type="text/css"/&gt; &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"&gt;&lt;/script&gt; &lt;script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $(document).ready(function() { $("#dialog").dialog({height:300}); $("#tabs").tabs(); }); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="dialog" style="overflow:hidden;"&gt; &lt;div id="tabs"&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="#tab-1"&gt;tab-1&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#tab-2"&gt;tab-2&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;div id="tab-1" style="overflow:auto;"&gt;Big content...&lt;/div&gt; &lt;div id="tab-2" style="overflow:auto;"&gt;Big content...&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload