【发布时间】:2011-12-17 04:39:59
【问题描述】:
我遇到了 IE6 的对齐问题。代码在 IE8 上工作得很好。我别无选择,只能支持 IE6。
说明:
我的网页包含两个页面。
page1(IE6) 的问题:
我在 page1 中有两个面板,每个面板都有一个网格视图。我想在页面中放置带有一些分组文本的面板。随着网格视图数据的不断增长,我想保持两个面板在左侧水平对齐页面的一侧和页面的右侧。所以它在 IE8 中完全可以工作,但是当我切换到 IE6 时,面板会在另一个上方垂直对齐。
这里是代码
<div>
<div style="float: left">
<table width="100%">
<tr>
<td>
<asp:Panel ID="pnlUsers" runat="server" GroupingText="UserDetails "Wrap="true">
</asp:Panel>
</td>
</tr>
</table>
</div>
<div style="float: right">
<table align="center" width="100%">
<tr>
<td>
<asp:Panel ID="pnlLocation" runat="server" GroupingText="Location Details" Wrap="true">
</asp:Panel>
</td>
</tr>
</table>
</div>
</div>
Page2(IE6) 问题
所以在这个页面中,面板的最大高度没有被采用,它垂直延伸,与面板的最大高度无关!!!
<asp:Panel ID="pnlAge" runat="server" ScrollBars="Vertical" Width="100%"
HorizontalAlign="Center" CssClass="pnlAlignmentClass">
<asp:GridView runat="server" ID="gvages" AutoGenerateColumns="False" CellPadding="4" Width="100%">
</asp:GridView>
</asp:Panel>
CSS:
.pnlAlignmentClass
{
max-height: 310px;
overflow: auto;
}
如果有人能提出正确的道路,我将不胜感激。
【问题讨论】:
-
你能把在 IE6 上看到的 html 贴出来吗?
-
@EmmanuelN 你的意思是屏幕截图吗?
标签: c# asp.net internet-explorer-6