Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1135
Problem - igCombo, custom style not applied
posted

Good day,

I am using the igCombo combobox throught my application, but am having trouble with the styling. I am using IgniteUI v13.2.20132.1010

I am overriding the [ui-igcombo ui-state-default ui-widget ui-corner-all] style for the span that is generated for the igCombo, but nothing happens. I have tried to add the class to the igCombo using jQuery's addClass() method, but also no luck. It seems that whatever I do, the Infragistics styles seem to be the default.

I am trying to override the dropdown by using the following:

.ui-igcombo .ui-state-default .ui-widget .ui-corner-all 
	{
		backgroundurl(../images/icon-fail.png) no-repeat right center #ffebef !important;
		color#480000 !important;
		width100% !important;    	
	}
Nothing works.

As an FYI, I am using an ASP DropDownList for the control that the igCombo is being applied to, could this be an issue?
Parents Reply
  • 4315
    Verified Answer
    Offline posted in reply to Eduard Kruger

    Hi, Eduard.

    The problem can be related to the CSS Specifity or maybe the class that you need is different. Can you please try to remove the spaces and concatenate the classes. For example when I inspect the following CSS rule inside the igCombo:

    Code Snippet
    1. .ui-igcombo.ui-state-hover, .ui-igcombo.ui-state-default {
    2.     background-color: transparent;
    3. }

    then if I need to override the default state my code should be:

    Code Snippet
    1. .ui-igcombo.ui-state-default {
    2.     background-color: #000000;
    3. }

    This works for me. In your code the two classes are separated with space and this change the things. Following CSS Specificity rules the .ui-igcombo.ui-state-default is stronger than .ui-igcombo .ui-state-default and it won't be overwritten. When you are using jQuery addClass() method, you are adding them with space, which means different classes - so this will not help you. 

    If this is not a problem, because you are using !important, which should work, this means another class should be used. Can you tell me what specifically you want to achieve and if possible share some code. I will investigate to ensure it is not a bug and propose you valid solution.

    I hope that my post was useful for you and I will wait for your feedback.

    Best regards,

    Nikolay Alipiev

Children