JQuery Mobile <ul>没有在完整浏览器中扩展</ul>

时间:2014-09-03 14:05:43

标签: jquery-mobile

在asp.net项目中使用带有输入控件的基本<ul><li>,无法弄清楚为什么<ul>不会扩展到完整的浏览器宽度? <ul>将以更广泛的<li>内容进行扩展。

<ul data-role="listview" id="ul-edit-picks" data-divider-theme="a" data-inset="true" data-scroll="true">
            <li data-role="list-divider">
                <h2 id="itemTitle">
                <asp:Label ID="Label1" runat="server" Text='<%# Eval("FDID")%>' Font-Bold="True" Font-Size="Medium"></asp:Label>
                : Selections</h2>
            </li>

            <li>1st Week:
                <asp:TextBox ID="CHOICE1TextBox" runat="server" Text='1st Week' ReadOnly="True"></asp:TextBox><br /> 
                <asp:HiddenField ID="CHOICE1HiddenField" runat="server" Value='<%# Bind("CHOICE1")%>' />
            </li> 

            <li>2nd Week:
                <asp:TextBox ID="CHOICE2TextBox" runat="server" Text='' ReadOnly="True"></asp:TextBox><br /> 
                <asp:HiddenField ID="CHOICE2HiddenField" runat="server" Value='<%# Bind("CHOICE2")%>' />
            </li>

...

            <li>
                <asp:Button ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update"
                    Text="Update Selections" ToolTip="Click to change your selections..."></asp:Button> 
                <asp:Button ID="UpdateCancelButton" runat="server" CausesValidation="False" CommandName="Cancel"
                    Text="Cancel"></asp:Button>
            </li>
</ul>   

屏幕截图:

reduced expanded

2 个答案:

答案 0 :(得分:0)

在&lt;上尝试使用data-inset =“false” ul&gt;

答案 1 :(得分:0)

确定问题发生在我页面的.net部分的<FormView>中,请参阅:asp.net formview generates table at fixed width 259px

似乎默认宽度为259px是根据内容大小自动生成的。