Font Size textbox

1 Answer 32 Views
TextBox
Eli
Top achievements
Rank 1
Iron
Eli asked on 07 Feb 2022, 09:46 PM | edited on 08 Feb 2022, 05:28 PM

I am having trouble with font sizing with the UI for Telerik. I posted before about setting font sizes for the datepicker and dropdowns which now work great.

Now I am having trouble setting the font size for the textbox control with floating label.

<div class="demo-section k-content">
    <h4>Set value</h4>
    @(Html.Kendo().TextBox()
        .Name("textbox")
        .Placeholder("Name")
        .Label(label => label
            .Content("Name")
            .Floating(true)
        )
        .HtmlAttributes(new { style = "width: 100%" })
    )

    <style>
        .k-floating-label-container {
            width: 100%;
        }
    </style>
</div>

I have modified CSS but the floating label looks incorrect when font size is adjusted through CSS. I would like size 14px font for both the input text and the floating label. How can I achieve this? Currently increasing the font size of the floating label makes the label not "float" far enough to the top, and obscures the textbox. Any help is appreciated.

Here is some examples of the extremely small text occuring on all UI inputs...

Textbox with filtering:

Datepicker:

This is really becoming a problem.

I still need a fix for the floating textbox, but I am wondering if there is a more universal fix that can be applied in the universal CSS. Please help, this is my only complaint with the UI so far.

I am losing time trying to adjust font sizes.

 

Eli
Top achievements
Rank 1
Iron
commented on 08 Feb 2022, 02:52 PM

My text size for most controls seems must smaller than the examples provided. I wonder why that is? My default text size seems to always be 10 px which requires me to increase for most controls. 

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 10 Feb 2022, 05:16 PM

Hi Eli,

 

Thank you for getting back to us.

You can fix this issue using the following CSS approach:
https://netcorerepl.telerik.com/wwkwFOFB1413WfFO59

As for the general font-size of 10px, I suggest you do the following:

1. Ensure that the zooming of the browser is proper.
2. Check your application for any custom CSS that might be forcing this smaller value.

 

Regards,
Eyup
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Eli
Top achievements
Rank 1
Iron
commented on 10 Feb 2022, 08:20 PM

Thank you. Is there a Bootstrap 3 compatible download available for use with MVC 5.0 and the latest Telerik install? Or is Bootstrap v4.0 required?
Eyup
Telerik team
commented on 15 Feb 2022, 02:19 PM

Hi


As Telerik is following the latest trends and browser updates, we have now switched to Bootstrap version 5, so you can check that instead.

Tags
TextBox
Asked by
Eli
Top achievements
Rank 1
Iron
Answers by
Eyup
Telerik team
Share this question
or