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

[Solved] RadInput height alignment problem next to ASP.NET textbox

1 Answer 169 Views
Input
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 22 Jan 2008, 04:45 AM
Hi

I'm using Visual Studio 2008, ASP.NET 3.5 and C#.

I have 2 textboxes for a phone#:
  • RadNumericTextBox for area code
  • ASP.NET textbox for phone#

When using the following code:

<telerik:RadNumericTextBox ID="txtPrimPhoneAC" Runat="server" Skin="Office2007" MinValue="0" MaxLength="7" MaxValue="999999" NumberFormat-DecimalDigits="0" Width="43px" >
    <NumberFormat AllowRounding="False" DecimalDigits="0" GroupSizes="9" />
</telerik:RadNumericTextBox>
<asp:TextBox ID="txtPrimPhoneNo" runat="server" Width="200px" MaxLength="30" ValidationGroup="vgUser"></asp:TextBox>

The placement of the RadNumericTextBox is a few pixels lower than the ASP.NET textbox.

What would be the best way to align their height?


Kind regards

Mark Eaton

1 Answer, 1 is accepted

Sort by
0
Accepted
Petja
Telerik team
answered on 22 Jan 2008, 10:41 AM
Hello Mark,

The behavior is observed because RadInput controls have set vertical alignment as many clients have requested it. You could either set vertical alignment of the asp.net textbox instance (style="vertical-align:middle") or override the RadInput alignment property by:
<head runat="server"
    <title>Untitled Page</title> 
    <style type="text/css" > 
    .radInput_Office2007 
    { 
        vertical-align: baseline !important; 
    } 
    </style> 
</head> 

Note that the height of the RadInput control is less than the asp.net textbox and you can set its Height property with a desired value if you want it bigger/smaller.

Kind regards,
Petja
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Input
Asked by
Mark
Top achievements
Rank 1
Answers by
Petja
Telerik team
Share this question
or