#10495 closed defect (wontfix)
TabContainer render too wide when use relative width
Reported by: | lingerer | Owned by: | |
---|---|---|---|
Priority: | high | Milestone: | 1.4 |
Component: | Dijit | Version: | 1.4.0 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
I'm tring upgrade my code from 1.3.2 to 1.4 and found my TabContainer became very wide. Here's my code:
<table width="98%" align="center"> <tr> <td> <div id="too long" dojoType="dijit.layout.TabContainer" doLayout="false" style="width: 100%; font-size: 9pt; text-align: left" class="bottomtab"> <div dojoType="dijit.layout.ContentPane" title="test" > <b>test</b> </div> </div> </td> </tr> </table>
The render result like this:
<div class="nowrapTabStrip dijitTabContainerTop-tabs dijitTabNoLayout" role="tablist" style="width: 50200px;" dojoAttachEvent="onkeypress:onkeypress" dojoAttachPoint="containerNode" wairole="tablist">
Attachments (1)
Change History (7)
Changed 11 years ago by
comment:1 Changed 11 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 Changed 11 years ago by
Resolution: | invalid |
---|---|
Status: | closed → reopened |
I don't think it is a invalid one. 1.This code works fine in 1.3 2.It still display extreme wide if I delete the width:100% in the TabContainer? widget class. 3.setting style="width:98%" in table won't work for this
comment:3 Changed 11 years ago by
Resolution: | → wontfix |
---|---|
Status: | reopened → closed |
If you want the 1.3 behavior you can specify controllerWidget=""dijit.layout.TabController?". That will turn off the scrolling tabs, which is what causes the width issue.
Otherwise, when sticking a TabContainer inside of a table, you need to specify a width in pixels or ems, not in percent.
comment:4 Changed 11 years ago by
Description: | modified (diff) |
---|---|
Summary: | TabContainer render too width when use relative width → TabContainer render too wide when use relative width |
comment:5 Changed 11 years ago by
Milestone: | 1.4.1 → 1.4 |
---|
comment:6 Changed 11 years ago by
This is a duplicate of #10113, and it's definitely a bug. Cross-posting here for clarity, and to let @lingerer know you're not crazy. :)
This is a common complaint. The problem is that you set width: 100% on your TabContainer. 100% of what width? The table's width? But the table determines it's width by how big it's contents are. If you want the table to be 98% the width of the viewport then try style="width: 98%".