开发者

jQuery-UI Tabs having problems with css float

I'am having a problem with jQueryUi Tabs. I want to have a navigation bar at the left side of my tabs view, but the layout is not working. I think it is a bug, and I will report it to jQuery, but first I want to see if you can confirm this to be a bug, or am I doing something wrong?

Preview my example at [ http://public.virtu开发者_StackOverflow社区almischa.de/bugs/jqueryui-tabslayout.html ].

First you see the non-working tabs example and below the working standard floating div example.

<!DOCTYPE html> 
<html> 
<head> 
  <title>JQuery Tablayout problems</title>
  <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.11/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"> 
  <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script> 
  <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.11/jquery-ui.min.js"></script> 
  <script type="text/javascript"> 
  $(document).ready(function () {
    $("#tabs").tabs();
  });
  </script>
</head>
<body>
<div style="float:left; width:200; color: red;height: 200px;">Where is my left bar?<br></div>
<div id="tabs"><ul><li><a href="#a1">A tab page</a></li></ul>
    <div id="a1">Do you see a red bar left of this tab view?</a></div>
</div>

<div style="float:clear"></div>

<div style="float:left; width:200; color: red;height: 200px;">Where is my left bar?<br></div>
<div id="no-tabs"><ul><li><a href="#a2">A tab page</a></li></ul>
    <div id="a2">Do you see a red bar left of this tab view?</a></div>
</div>
</body>
</html>


The solution here fixed my issue, which looks somewhat like yours. Look at jquery ui tip floated divs inside for more information.

#yourTabsDiv {
  float:left;

  width: 100%;

}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜