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

Vertical alignment of RadTextBox and asp:button

1 Answer 305 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 17 Dec 2008, 05:10 AM

Hi,

What is the best way to put a RadTextBox and an asp:button side by side to have them vertically aligned?I have put them inside a table and the button does not align with the RadTextBox.

Using Opera (v9.63) it's only off by 1 pixel, but in IE7 it's off by +3 pixels.

Kind Regards,

Robert

1 Answer, 1 is accepted

Sort by
0
Accepted
Dimo
Telerik team
answered on 17 Dec 2008, 08:50 AM
Hello Robert,

If RadTextBox has ShowButton set to True, it renders as a vertically centered table. Otherwise it renders as a span element with no vertical alignment. In other words, depending on the control's settings, you may need to add a vertical-align:middle to the button. For example:

<telerik:RadTextBox ID="RadTextBox1" runat="server" Text="RadTextBox" /> 
<asp:Button ID="Button1" runat="server" Text="Button" /> 
 
<br /><br /> 
 
<asp:Button ID="Button2" runat="server" Text="Button" style="vertical-align:middle" /> 
<telerik:RadTextBox ID="RadTextBox2" runat="server" Text="RadTextBox" ShowButton="true" /> 
 


Best wishes,
Dimo
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
General Discussions
Asked by
Robert
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or