当前位置:编程学习 > C#/ASP.NET >>

网页布局不能兼容IE6问题

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"  "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head runat="server">
    <title>运城市热能抄表及远程监控分析系统</title>
    <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
    <meta name="CODE_LANGUAGE" content="C#">
    <meta name="vs_defaultClientScript" content="JavaScript">
    <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
    <link href="css/css.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript">
        function onKeyDown(ImageButton2) {
            if (event.keyCode == 13) {
                event.keyCode = 9;
                event.returnValue = false;
                document.all[ImageButton2].click();

            }
        }
    </script>

</head>
<body style="background-color: #e1efde">
    <form id="Form1" method="post" runat="server">
    <table align="center" cellpadding="0" cellspacing="0" width="1024px" height="768px"
        style="border: 1px solid #666666; background-image: url('images/logo.png'); background-repeat: no-repeat;">
        <tr>
            <td>
                <table align="left" cellpadding="0" cellspacing="0" style="width: 152px; height: 102px;
                    margin-top: 274px; margin-left: 721px;" >
                    <tr>
                        <td height="37px">
                            <asp:TextBox ID="tx_UserName" Style="width: 149px; height: 25px" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td height="30px">
                            <input id="tx_Password" style="width: 149px; height: 25px" type="password" maxlength="16"
                                name="tx_Password" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td height="35px"   align="center"  valign="bottom">
                 
                            <asp:ImageButton ID="ImageButton2" runat="server" ImageUrl="~/images/btnLogin.png" 
                                OnClick="ImageButton2_Click" Height="23px"  />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    </form>
</body>
</html>

在IE6浏览器有点变形了,如下图:
但是在IE7以上浏览器显示是正常的,这个怎么修改啊? --------------------编程问答--------------------
引用 楼主 fanxiaolin84 的回复:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"  "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head runat="server">
    <title>运城市热能抄表及远程监控分析系统</title>
    <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
    <meta name="CODE_LANGUAGE" content="C#">
    <meta name="vs_defaultClientScript" content="JavaScript">
    <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
    <link href="css/css.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript">
        function onKeyDown(ImageButton2) {
            if (event.keyCode == 13) {
                event.keyCode = 9;
                event.returnValue = false;
                document.all[ImageButton2].click();

            }
        }
    </script>

</head>
<body style="background-color: #e1efde">
    <form id="Form1" method="post" runat="server">
    <table align="center" cellpadding="0" cellspacing="0" width="1024px" height="768px"
        style="border: 1px solid #666666; background-image: url('images/logo.png'); background-repeat: no-repeat;">
        <tr>
            <td>
                <table align="left" cellpadding="0" cellspacing="0" style="width: 152px; height: 102px;
                    margin-top: 274px; margin-left: 721px;" >
                    <tr>
                        <td height="37px">
                            <asp:TextBox ID="tx_UserName" Style="width: 149px; height: 25px" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td height="30px">
                            <input id="tx_Password" style="width: 149px; height: 25px" type="password" maxlength="16"
                                name="tx_Password" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td height="35px"   align="center"  valign="bottom">
                 
                            <asp:ImageButton ID="ImageButton2" runat="server" ImageUrl="~/images/btnLogin.png" 
                                OnClick="ImageButton2_Click" Height="23px"  />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    </form>
</body>
</html>

在IE6浏览器有点变形了,如下图:
但是在IE7以上浏览器显示是正常的,这个怎么修改啊?


掉美工把! --------------------编程问答-------------------- 先在IE6搞正常再放到IE7上 --------------------编程问答-------------------- 抛弃吧,折腾啥,征服客户
补充:.NET技术 ,  ASP.NET
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,