繁体   English   中英

asp.net应用程序中的IE6面板有问题吗?

[英]Issues with IE6 panels in asp.net application?

我遇到了IE6的对齐问题。代码在IE8上也能正常工作。我别无选择,只能支持IE6。

描述:

我的网页包含两个页面。

第1页(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不支持max-height。 您可以使用常规高度,但是在IE6中,它的行为实际上类似于最小高度。

要在ie6中进行最大高度设置,请点击以下链接: http : //perishablepress.com/press/2007/01/16/maximum-and-minimum-height-and-width-in-internet-explorer/

* html div#division { 
   height: expression( this.scrollHeight > 332 ? "333px" : "auto" ); /* sets max-height for IE */
}

div#division {
   max-height: 333px; /* sets max-height value for all standards-compliant browsers */
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM