简体   繁体   中英

Styles are not set in IE10

I have two servers... one is of the TEST. Other.. of the live (productions). Both is of SAME OS and with the same hardware (32 bits), and same .NETs (4).

In one the LIVE, my styles attributes... uninclused.

Example:

<asp:textbox runat=server width=250 id=ctl32 />

In ALL browser, but the #10, render becomes:

style="width:250px;"

BUT in the ie10, doesn't set the style, is this a bug of .NET?

first you should avoid doing inline style settings. But I think you are setting an attribute, which is a deprecated way to apply the width to an element, it should be in a style rule. So in your css file (please avoid inline styles) create a class to set your with:

.myInput250{ width:250px; }

and in your webforms textbox declaration reference it:

Internet Explorer 10可以正确识别ASP.NET TextBoxwidth属性似乎存在问题,而不是使用Width属性,请尝试以下操作:

 <asp:textbox runat="server" id="ctl32" style="width: 250px;" />

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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