RadNumericTextBox RadMaskedTextBox style problem

3 posts, 1 answers
  1. Morten Bomholt
    Morten Bomholt avatar
    22 posts
    Member since:
    Jan 2009

    Posted 18 Mar 2009 Link to this post

    I am currently styling alot of radtextboxes and radnumerictextbox in a table and i cannot get them aligned underneath each other.

    It seems the right border of wrapper on the  numeric textbox pushes one pixel more to the right than on
    other textboxes. Of course i can set the width of the numeric textbox to one less pixel, but that gives me no perfect right alignment.

    The maskedTextBox is also off by one to the right. I could pad the radtextbox one more pixel to the right, but would like exactly one pixel in between the table and the controls.
  2. Answer
    Dimo avatar
    8458 posts

    Posted 19 Mar 2009 Link to this post

    Hello Morten,

    Please note that providing links to dev version of our assemblies in the forums is unacceptable.

    Now to your question - all RadInput textboxes have a number of <input type="text" /> elements, which are rendered, but hidden with CSS. These hidden textboxes are used for storing the control value in a different format, etc. The number of hidden textboxes is different, depending on the control. RadTextBox has only one, while numeric textboxes and masked textboxes have two. Since the hidden textboxes are positioned on the right side of the visible textbox, they push the visible textbox to the left when the controls are placed inside a right-aligned container.

    You options are:

    1) Use right margin of 1px for right-aligned RadTextBox controls


    2) hide the invisible textboxes completely with a display:none style. This is an option if you are not using validator callout extenders, because they rely on these hidden textboxes in order to position the callouts.


         display: none !important;

    We will research for a way to prevent such unexpected behavior in the future.

    Sincerely yours,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Morten Bomholt
    Morten Bomholt avatar
    22 posts
    Member since:
    Jan 2009

    Posted 19 Mar 2009 Link to this post

    Howdy Dimo

    Thx for the answer i went with the hidding of the invisible textboxes, and it works for now. :)

    Of course it's unacceptable to ship the dev with a project and it will never happen again.

Back to Top