I use jQuery UI 1.8.16 for tabs.
I want to place in first tab few divs as columns (with float:left
property).
But I can't do it correctly: looks like tabs don't want to work with float property in proper way (see image under the text).
There is code:
<div id="tabs">
<ul>
<li><a href="#tabs-1">First</a></li>
<li><a href="#tabs-2">Second</a></li>
<li><a href="#tabs-3">Third</a></li>
</ul>
<div id="tabs-1">
<div style="border:1px solid red;float:left;">
some text<br>some text<br>some text<br>some text<br>some text<br>some text<br>some text<br>some text<br>
</div>
</div>
<div id="tabs-2"></div>
<div id="tabs-3"></div>
</div>
How to fix that?
Thanks!
You have to clear your floats in order for the container to compute the proper height:
<div id="tabs-1">
<div style="border: 1px solid red; float: left;">
some text<br>some text<br>some text<br>some text<br>some text<br>some text<br>some text<br>some text<br>
</div>
<div style="clear: both;"></div>
</div>
You can see the results in this fiddle.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With