Right Align a TelerikNumericTextBox

1 Answer 13 Views
NumericTextBox
Brett Parkhurst
Top achievements
Rank 1
Brett Parkhurst asked on 24 Jun 2025, 06:18 PM

I have tried and tried to get a TelerikNumericTextBox aligned right.  Honestly, for a numeric text box, this should just be a property on the component.  Crazy.

Anyway, here is what I've tried and have been through all the forums, etc.

CSS

/* Right-align input in TelerikNumericTextBox for this component */
.p21-numerictextbox-right .k-numerictextbox .k-input-inner {
    text-align: right !important;
}

Markup

<TelerikNumericTextBox @ref="P21NumericTextEditorRef"
                       Class=" p21-numerictextbox-right"
                       @bind-Value="_value"
                       Arrows="false"/>

This does not work.  Any thoughts?

Thank you!

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 25 Jun 2025, 06:18 AM

Brett - there should be no space between .p21-numerictextbox-right and .k-numerictextbox. A space is a descendant combinator, while these two classes render on the same element.

https://blazorrepl.telerik.com/cJkqmpEU174tgAIe05

 

Regards,
Dimo
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Brett Parkhurst
Top achievements
Rank 1
commented on 28 Jun 2025, 02:46 AM

Thank you so much!  This did the trick.  I appreciate it.
Tags
NumericTextBox
Asked by
Brett Parkhurst
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or