简体   繁体   English

IE11上的asp:TextBox上没有宽度

[英]No Width on asp:TextBox on IE11

the Widths (and Heights) are not correct on my IE 11. All other Browsers works fine. 宽度(和高度)在我的IE 11上不正确。所有其他浏览器都可以正常工作。

But: on the project Development (W7, IIS 8, VS2013) at my Development PC its all OK on IE 11 但是:在我的开发PC上的Project Development项目(W7,IIS 8,VS2013)上,IE 11都可以

and then: if I get the same site from my V-Server in the Web, the IE shows all Textboxes with the same width.(on Web: Windows Server Web 2007, SP2, IIS6) With the F12-Key I checked the Code and I have seen, that there are no With-Tag for the Textboxes. 然后:如果从Web中的V服务器获得相同的站点,则IE将显示具有相同宽度的所有文本框。(在Web上:Windows Server Web 2007,SP2,IIS6)使用F12键检查代码而且我已经看到,文本框没有With-Tag。

I dont know what to do - can somebody help me? 我不知道该怎么办-有人可以帮我吗? (all under MS FW4) Thank you Grüße von Torsten (全部在MS FW4下进行)谢谢Grüßevon Torsten

My Code: 我的代码:

<!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>

将您的meta标记修改为IE=edge而不是IE=8

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

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

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