How do I set the font size for items in a DropDownList?
I saw a tip suggesting the method below, but it hasn't worked for me.
k-popup .k-item { font-size: 24px; }
Please advise.
/Br Anders
1 Answer, 1 is accepted
1
Ivan Danchev
Telerik team
answered on 19 Apr 2024, 08:29 AM
Hi Anders,
You can use the following CSS rule to increase the size of the font in the DropDownList items:
<style>
.k-popupli {
font-size: 24px;
}
</style>
Be advised that this will affect all li elements nested in an element with the class "k-popup". So, if you want to target a specific DropDownList, you could use the id of the popup ul element. See this example: https://netcorerepl.telerik.com/wIYoFtkM22rgp9e837
The id of the popup ul element that contains the li elements is formed like this: the Name of the component (in the example linked above the name is color) concatenated with "_listbox". This is why the selector used in my example is:
#color_listboxli
Regards,
Ivan Danchev
Progress Telerik
Stay tuned by visiting our public roadmap and feedback portal pages. If you're new to the Telerik family, be sure to check out our getting started resources, as well as the onlyREPL playground for creating, saving, running, and sharing server-side code.