We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How can I change the font family of a selected DropDownList item ?

Thread ID:

Created:

Updated:

Platform:

Replies:

132399 Aug 30,2017 02:17 PM UTC Aug 31,2017 06:29 AM UTC JavaScript 2
loading
Tags: ejDropDownList
tomer
Asked On August 30, 2017 02:17 PM UTC

Hi,

The following code change only the DropDownList item's font but not the selected text.

Meaning: after selecting one item, the dropdown item closed and then we can see the selected item - this one is not with the correct font family.

<style> 
    .ddlFont { font-family: Arial; }
</style>

<ej:DropDownList ID="DropDownList1" runat="server" CssClass="ddlFont">
    <Items>
        <ej:DropDownListItem Text="English" Value="en-US" />
        <ej:DropDownListItem Text="Arabic" Value="ar-AR" />
    </Items>
</ej:DropDownList>


Thanks,
   Tomer

tomer
Replied On August 30, 2017 03:02 PM UTC

I noticed that this issue occurred only on my Firefox (version: 55.0.3)


Prince Oliver [Syncfusion]
Replied On August 31, 2017 06:29 AM UTC

Hi Tomer, 

Thank you for contacting Syncfusion forums. 

To change the font family of a selected DropDownList item, you need to override the existing default font family for the visible input element. Kindly refer to the following code snippet. 

<style>  
    .ddlFont, .ddlFont.e-ddl .e-input { font-family: Arial; } 
</style> 

We have prepared a sample for your convenience, kindly refer to the following link for the sample: http://www.syncfusion.com/downloads/support/forum/132399/ze/DropDownSample-715200558 

Regards, 
Prince 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;