[英]how to set width of style to match outer DIV
Using JQuery tabs, I have 2 tabs inside my div, Info & Images
使用JQuery标签,我的div,
Info & Images
有2个标签
Contents of <ul>
contains the 2 tabs, ul is coloured blue. <ul>
内容包含2个选项卡,ul为蓝色。 but the OnCLickk="ViewFeatureWorkflowImagePostBackBtn_Click"
returns a table. 但是
OnCLickk="ViewFeatureWorkflowImagePostBackBtn_Click"
返回一个表。
If the contents of the table is wider than the updatePanel width(300), the scroll bar appears and allows the user to view the rest of the table, adjusting the width of the update panel, thus not showing blue for the remainder of the ul. 如果表的内容比updatePanel width(300)宽,则会显示滚动条,并允许用户查看表的其余部分,从而调整更新面板的宽度,从而在ul的其余部分不显示蓝色。 。
So iv tried setting the width of the ul to 100% which I though would fill the outer div...didnt work..any ideas? 因此,iv尝试将ul的宽度设置为100%,尽管我可以填满外部的div。
<asp:UpdatePanel runat="server" ID="UpdatePanel8" UpdateMode="Conditional" ChildrenAsTriggers="true"
Style="position: relative; overflow: hidden; background-color: White;
width: 300px; height: 300px; margin: 5px; text-align: center; outline-style: none; overflow-y: hidden; overflow-x:hidden;">
<%--width: 500px; height: 450px; --%>
<ContentTemplate>
<div id="DivHolding2Tabs" class="overflowcontent" style="border-color:Black;border-width:1px;border-style:solid;">
<ul id="tabList" style="width:inherit;">
<li><a href="#tabs-1">Info</a> </li>
<li><a href="#tabs-2" style="display:none;">Images</a> </li>
</ul>
<div id="tabs-1" class="WorkFlowLayout">
<b><font color="FF6600">Feature Properties </font></b>
<div id="divFeatureInfo" runat="server">
</div>
</div>
<div id="tabs-2" class="WorkFlowLayout">
<b><font color="FF6600">Images</font></b>
<div id="ImagesRelatingToFeatureDIV" runat="server">
</div>
</div>
</div>
<br />
<br />
<div class="buttonwrap">
<span id="Span5" class="ActionBtns">
<asp:Button ID="ViewFeatureWorkflowImagePostBackBtn" runat="server" Style="display: none;
visibility: hidden;" OnClick="ViewFeatureWorkflowImagePostBackBtn_Click" />
</span>
</div>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="ViewFeatureWorkflowImagePostBackBtn" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
Add an additional wrap div
inside your .overflowcontent
. 在
.overflowcontent
内添加一个额外的wrap div
。 Tab div
and .overflowcontent
should not be the same. Tab
div
和.overflowcontent
不应相同。
<div class="overflowcontent">
<div id="DivHolding2Tabs">
<!-- tabs -->
</div>
</div>
It doesn't look like the ul is the only problem. 看起来ul不是唯一的问题。 Try this.
尝试这个。
ul, .WorkFlowLayout, .overflowcontent {
width: 100%!important;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.