IE9 RadTextBox width at 160px

4 posts, 1 answers
  1. Jon
    Jon avatar
    813 posts
    Member since:
    Oct 2008

    Posted 28 Jun 2012 Link to this post

    Hi,

    All of a sudden my site is displaying all textboxes at 160px wide on IE9.  If I view a page in Chrome or IE9 with Compatibility mode turned on its fine.

    I have whittled a page down to the following, the first textbox shows the issue and the second just shows the 160px width.

    Looking at the styles I can see that for some reason the width is being explicitly set as 160px which then overrides the CSS based width.

    I'm not going to change the code to specify the width for every textbox as this appears to be a bug.  Please advise of a work around.

    Regards,

    Jon

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     
    <head runat="server">
        <title></title>
        <style type="text/css">
            .fullWidthTextBox
            {
                width:578px ! important;
            }
        </style>
    </head>
    <body>
        <form id="form1" runat="server">
            <telerik:RadScriptManager ID="uxRadScriptManager" runat="server"></telerik:RadScriptManager>
            <telerik:RadStyleSheetManager ID="uxRadStyleSheetManager" Runat="server"></telerik:RadStyleSheetManager>
            <telerik:RadTextBox ID="uxAccount" Runat="server" CssClass="fullWidthTextBox"></telerik:RadTextBox><br/>
            <telerik:RadTextBox ID="uxAccount2" Runat="server" Width="160"></telerik:RadTextBox><br/>
        </form>
    </body>
    </html>

  2. Jon
    Jon avatar
    813 posts
    Member since:
    Oct 2008

    Posted 28 Jun 2012 Link to this post

    It's worth noting that I was on the latest Q2 2012 release and just updated to the June 26 internal build to see if that fixed the issue - it didn't.. :(
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Answer
    Eyup
    Admin
    Eyup avatar
    3005 posts

    Posted 29 Jun 2012 Link to this post

    Hello Jon,

    Please try the following approach:
    <telerik:RadTextBox ... WrapperCssClass="fullWidthTextBox">

    Regards,
    Eyup
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  5. Jon
    Jon avatar
    813 posts
    Member since:
    Oct 2008

    Posted 29 Jun 2012 Link to this post

    Many thanks for that, works a treat!

    Now to do a global search and replace - I just need to hope that I didn't use the textbox specific CSS on any nontextbox elements!

    Best Regards,

    Jon
Back to Top