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

Removing extra space in radnumerictextbox

3 Answers 126 Views
Input
This is a migrated thread and some comments may be shown as answers.
RJ
Top achievements
Rank 1
RJ asked on 02 Jul 2013, 07:25 PM
Hi All,
How can I remove extra space in my radnumerictextbox. Whenever I change the width of the textbox it only applies to my textbox but there still about 80px of space after the spinbuttons. I am adding an imagebutton beside it but then it has huge gap between the spinbuttons and the icon and it doesnt look good. Heres the code. Thanks in advance.
<telerik:RadNumericTextBox ID="rntNumber" ShowSpinButtons="true" Width="50px" MaxLength="3" runat="server" Value="50" MinValue="10" MaxValue="200" NumberFormat-DecimalDigits="0">
 </telerik:RadNumericTextBox>
<asp:ImageButton ID="infoBtn" runat="server" width="20px" height="20px" BorderWidth="0px" ImageUrl="../Images/Info.gif" />

3 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 03 Jul 2013, 05:34 AM
Hi RJ,

Try shifting the icon of the ImageButton to the left by setting an appropriate value to the margin-left CSS property. Please check the following sample code.

ASPX:
<telerik:RadNumericTextBox ID="rntNumber" ShowSpinButtons="true" Width="50px" MaxLength="3"
    runat="server" Value="50" MinValue="10" MaxValue="200" NumberFormat-DecimalDigits="0">
</telerik:RadNumericTextBox>
<asp:ImageButton ID="infoBtn" runat="server" Width="20px" Height="20px" BorderWidth="0px"
    CssClass="styleIcon" ImageUrl="~/Images/Close.png" />

CSS:
<style type="text/css">
    .styleIcon
    {
        margin-left: -10px;
    }
</style>

Thanks,
Shinu.
0
RJ
Top achievements
Rank 1
answered on 03 Jul 2013, 08:38 AM
Thanks a lot Shinu.
0
RJ
Top achievements
Rank 1
answered on 03 Jul 2013, 08:39 AM
Thanks a lot Shinu, css did the trick.
Tags
Input
Asked by
RJ
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
RJ
Top achievements
Rank 1
Share this question
or