Note that there are some explanatory texts on larger screens.

plurals
  1. POJQuery UI tabs header too big with css floated two-column layout
    primarykey
    data
    text
    <p>I'm trying to set up JQuery UI tabs in the right column of a two-column layout powered by <code>float: left</code>.</p> <p>The problem is: the <strong>header</strong> of the tabs gets sized to have the <strong>same height</strong> as the left column.</p> <p>HTML:</p> <pre><code>&lt;div id="zone_content"&gt; &lt;div id="zone_main"&gt; &lt;div id="zone_left"&gt; &lt;p&gt;Stuff&lt;/p&gt;&lt;p&gt;Stuff&lt;/p&gt;&lt;p&gt;Stuff&lt;/p&gt;&lt;p&gt;Stuff&lt;/p&gt;&lt;p&gt;Stuff&lt;/p&gt; &lt;/div&gt; &lt;div id="zone_tabs"&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="#tabs-1"&gt;Tab 1&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#tabs-2"&gt;Another Tab&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;div id="tabs-1"&gt; &lt;p&gt;blah blah blah blah&lt;/p&gt; &lt;/div&gt; &lt;div id="tabs-2"&gt; &lt;p&gt;bloh bloh bloh bloh&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;script&gt; $(function() { $("#zone_tabs").tabs(); }); &lt;/script&gt; </code></pre> <p>CSS:</p> <pre><code>#zone_main { overflow: auto; width: 100%; } #zone_left { float: left; width: 250px; } #zone_tabs { margin-left: 250px; } </code></pre> <p>See the <a href="http://jsfiddle.net/576pc/" rel="nofollow noreferrer">jsfiddle</a>.</p> <p>I noticed it might be the same question as <a href="https://stackoverflow.com/questions/6802358/jquery-ui-tabs-having-problems-with-css-float">this one</a>, but while the answer of adding <code>float: left;</code> on the #zone_tabs corrects the header height, it also push the tabs down to after the end of the left column. (It does so when the left column is large enough: 250px in the jsfiddle ; if one reduce it to 100px in both places where it's specified, the tabs find their intended place.)</p> <p>So, could anyone help me, and explain me why all of this happen ?</p> <p><em>Versions</em>: Chrome 23 or Firefox 23, JQuery 1.8.2, JQuery UI 1.9.1</p>
    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.
 

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