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

RadNumericTextBox RadMaskedTextBox style problem

2 Answers 130 Views
Input
This is a migrated thread and some comments may be shown as answers.
Morten Bomholt
Top achievements
Rank 1
Morten Bomholt asked on 18 Mar 2009, 02:10 PM
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 Answers, 1 is accepted

Sort by
0
Accepted
Dimo
Telerik team
answered on 19 Mar 2009, 11:54 AM
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

or

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.

CSS

.rdfd_
{
     display: none !important;
}


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

Sincerely yours,
Dimo
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.
0
Morten Bomholt
Top achievements
Rank 1
answered on 19 Mar 2009, 01:12 PM
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.

Morten
Tags
Input
Asked by
Morten Bomholt
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Morten Bomholt
Top achievements
Rank 1
Share this question
or