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
715
Html Attributes with igEditors
posted

Hello,

This is a question about using css states such as hover with igEditors and html attributes.

So imagine a css class called "editor":

.editor{

    .border: 1px solid gray;

}

and a focus state for it:

.editor:focus{

    .border: 1px solid black;

}

and now an html attribute object:

Dictionary<string, object> editorAttr = new Dictionary<string, object>();

editorAttr.add("class", "editor");

 

and lastly an igEditor with html attribute:

@(Html.Infragistics().TextEditorFor(model => model.FirstName, editorAttr).Render()

When I run this, the igEditor will pick up the basic "editor" class properties but does not take on the focus properties when the control gets the focus.

 

Can you help me determine why this is not happening?

Thank You,

Randy

 


 

 

 

Parents
  • 37874
    posted

    Hi Randy,

    I tested this and it seems that the custom styles get overridden by the default ones. A possible solution would be to make your css selectors more specific and add the !important declaration, for example:

    input.editor:focus{

        border: 1px solid black !important;

    }

    This worked for me.

    Let me know if it helps.

Reply Children