0
我得到一個CSS顯示錯誤在IE7只有當我插入內部的<ItemTemplate>
<div>
標籤。當我直接在<itemtemplate>
內刪除<div>
標籤時,列表顯示正確。 IE7和itemTemplate選項有問題嗎?IE7 ItemTemplate中的CSS失真
<asp:Repeater ID="rTracks" runat="server" OnItemDataBound="rTracks_ItemDataBound" EnableViewState="true">
<ItemTemplate>
<div style='display: <asp:Literal ID="ltSongTrack" runat="server" Text="block" />;'>
<li onclick="hasKaraokeChanges=false;" class='admin-song ui-selectee <asp:Literal id="ltStatusClass" runat="server" />' mediaid="<%# Eval("MediaId") %>" artistid="<%# Eval("tbMedia.tbArtists.id") %>"><span class="handle"><strong style="display:none;">
<%--<%# int.Parse(DataBinder.Eval(Container, "ItemIndex", "")) + 1%>--%><%# Eval("SortNumber")%></strong><%--0:03--%></span> <span class="play"><span class="btn-play"> </span></span> <span class="track" title="<%# Eval("tbMedia.Title") %>">
<%# Eval("tbMedia.Title") %></span> <span class="artist">
<%# Eval("tbMedia.tbArtists.Name") %></span> <span class="time" length="<%# Eval("tbMedia.Length") %>">
<asp:Literal ID="ltRuntime" runat="server" /></span> <span class="notes"><span class="btn-notes">
<asp:Literal ID="ltNotesCount" runat="server" /></span></span> <span class="status">
<asp:Literal ID="ltStatus" runat="server" /></span> <span class="date">
<%# Eval("DateAdded") %></span> <span id="spanStatus" class="remove"><asp:LinkButton ID="lbStatusClass2" OnClientClick="isSortingOrChangingStatus=true;isChangingStatus=true;" runat="server" CssClass="btn-del" OnClick="UpdateStatus" ValidationGroup='<%#Bind("MediaId") %>'>
<%--<span id="span<%# Eval("MediaId") %>" onclick="ChangeStatusClick(this,<%# Eval("MediaId") %>)" mediaid="<%# Eval("MediaId") %>" class='<asp:Literal id="ltStatusClass2" runat="server" Text="btn-del" />'>--%>
<%--</span>--%></asp:LinkButton></span></li>
</div>
</ItemTemplate>
<AlternatingItemTemplate>
<div style='display: <asp:Literal ID="ltAltSongTrack" runat="server" Text="block" />;'>
<li onclick="hasKaraokeChanges=false;" class='admin-song ui-selectee <asp:Literal id="ltStatusClass" runat="server" /> alt' mediaid="<%# Eval("MediaId") %>" artistid="<%# Eval("tbMedia.tbArtists.id") %>"><span class="handle"><strong style="display:none;">
<%--<%# int.Parse(DataBinder.Eval(Container, "ItemIndex", "")) + 1%>--%><%# Eval("SortNumber")%></strong><%--0:03--%></span> <span class="play"><span class="btn-play"> </span></span> <span class="track" title="<%# Eval("tbMedia.Title") %>">
<%# Eval("tbMedia.Title") %></span> <span class="artist">
<%# Eval("tbMedia.tbArtists.Name") %></span> <span class="time" length="<%# Eval("tbMedia.Length") %>">
<asp:Literal ID="ltRuntime" runat="server" /></span> <span class="notes"><span class="btn-notes">
<asp:Literal ID="ltNotesCount" runat="server" /></span></span> <span class="status">
<asp:Literal ID="ltStatus" runat="server" /></span> <span class="date">
<%# Eval("DateAdded") %></span> <span id="spanStatus" class="remove"><asp:LinkButton ID="lbStatusClass2" OnClientClick="isSortingOrChangingStatus=true;isChangingStatus=true;" runat="server" CssClass="btn-del" OnClick="UpdateStatus" ValidationGroup='<%#Bind("MediaId") %>'>
<%--<span id="span<%# Eval("MediaId") %>" onclick="ChangeStatusClick(this,<%# Eval("MediaId") %>)" mediaid="<%# Eval("MediaId") %>" class='<asp:Literal id="ltStatusClass2" runat="server" Text="btn-del" />'>--%>
<%--</span>--%></asp:LinkButton></span></li>
</div>
</AlternatingItemTemplate>
</asp:Repeater>
我有這些文字控制,這樣我就可以控制顯示風格的服務器端。意思是我想改變顯示來改變。當我查看這個IE8,9或FF時,IE7上的頁面佈局沒有任何變化 – ChampChris 2011-02-15 00:35:32