PRASHANT P
PRASHANT P

Reputation: 1547

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?

Upvotes: 1

Views: 898

Answers (2)

Karl Anderson
Karl Anderson

Reputation: 34846

There seems to be an issue with the width attribute of an ASP.NET TextBox being recognized properly by Internet Explorer 10. Instead of using the Width attribute, try this:

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

Upvotes: 0

Chris Love
Chris Love

Reputation: 3893

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:

Upvotes: 1

Related Questions