Dojo TabContainer with styling in Internet Explorer
The following works in firefox:
< div style="position:absolute;top:0px;margin-top:60px;bottom:0px;width:100%"> < div id="mainTabContainer" dojoType="dijit.layout.TabContainer" style="width:100%;height:100%"> {% for row in tabContent %} < div id="{{row.0}}" dojoType="dijit.layout.ContentPane" title="{{row.1}}"> {% include row.2 %} < /div> {% endfor %} < /div> < /div>
but in ie it doesn't display. When I take out the css on the outer div, it works.
I also tried just
< div style="position:absolute;top:0px;margin-top:60px;bottom:0px;width:100%"> < div style="width:100%;height:100%"> asdf < /div> < /div>
and that works fine. Does anyone know why the css would mess up rendering of the TabContainer in ie? Or is there a better way to make sure the TabContainer only takes up the space of the window (to prevent having two scrollbars--one for the container and one for the browser)? Thanks.
What version of IE?
Try adding the following CSS rule: html, body { height: 100%; width: 100%; margin: 0; padding: 0; }
The other thing you could do (though it might seem heavy-handed) is have a BorderContainer as your top-level element and have the TabContainer as the region="center" part.
<div dojoType="dijit.layout.BorderContainer" style="width:100%;height:100%">
<div dojoType="dijit.layout.ContentPane region="top" style="height:60px">
...
</div>
<div dojoType="dijit.layout.TabContainer region="center">
...
</div>
</div>
I confess I can't try this in IE as am on Mac but have been doing loads of dijit layout lately and something like this should work.
链接地址: http://www.djcxy.com/p/88790.html上一篇: 底部到表格行<tr>