This is a migrated thread and some comments may be shown as answers.

Textbox Width Issues

1 Answer 71 Views
Input
This is a migrated thread and some comments may be shown as answers.
License
Top achievements
Rank 1
License asked on 17 Feb 2014, 05:07 PM
Can somebody explain to me why the width of any RadNumericTextbox or RadTextbox will appear to change when the page is rendering? It initially appears that the widths are completely off then just before rendering finishes, they resize to the proper width.

I ask this because I am placing some generic RequiredFieldValidators beside these textboxes on my form and there is an unnecessary margin on the right side of each. If I set EnableSingleInputRendering = "False", the issue is resolved and there is only about a 5px padding vs. the nearly 30px margin otherwise. I'd prefer to understand what is actually different instead of just changing ever textbox on my form to turn Single Input Rendering off.

I really don't like the experience of the widths changing at the last millisecond of rendering and I don't see any use for that additional space.

1 Answer, 1 is accepted

Sort by
0
Venelin
Telerik team
answered on 20 Feb 2014, 12:41 PM
Hi Robert,

I'm not sure if we are talking about the same issue but onInitialize client-side event there are some javascript calculation performed that tend to equalize the width of RadTextBox in IE7 and other browsers. In other words - makes the control consistently looking in all browsers.  Yes, it might be possible to see small glitch during load that lasts few milliseconds. The effect, however, can be amplified if there is more padding in the text box, because then, the difference in box models in IE7 and standards-compliant browsers becomes more evident. You can overwrite the width using the !important clause to avoid this effect, but I wouldn't recommend this.

You can also refer to this help topic: http://www.telerik.com/help/aspnet-ajax/input-css-width.html

Regards,
Venelin
Telerik
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 UI for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Input
Asked by
License
Top achievements
Rank 1
Answers by
Venelin
Telerik team
Share this question
or