IE上的asp:TextBox上没有宽度

时间:2014-01-23 17:08:30

标签: asp.net internet-explorer width

我的IE 11上的宽度(和高度)不正确。所有其他浏览器工作正常。

但: 关于我的开发PC上的项目开发(W7,IIS 8,VS2013),IE 11上的一切正常

然后:如果我从Web上的V-Server获得相同的站点,IE将显示所有具有相同宽度的文本框。(在Web上:Windows Server Web 2007,SP2,IIS6) 使用F12-Key我检查了代码,我看到,文本框没有With-Tag。

我不知道该怎么办 - 有人能帮帮我吗? (均为MS FW4) 谢谢 GrüßevonTorsten

我的代码:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
  <meta content="IE=8" http-equiv="X-UA-Compatible" />
</head>
<body>
    <form id="form1" runat="server">
    <div>
      <asp:TextBox ID="TextBox1" runat="server" Width="100px"></asp:TextBox>
      <asp:TextBox ID="TextBox2" runat="server" Width="50px"></asp:TextBox>

    </div>
    </form>
</body>
</html>

1 个答案:

答案 0 :(得分:1)

将您的meta代码修改为IE=edge而不是IE=8

<meta content="IE=edge" http-equiv="X-UA-Compatible" />