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
Hi Randy,
I'm glad you got it working.
If you have any other questions or concerns, don't hesitate to ask.
Hi Nikolay,
I'm embarrassed to report that it was just a typo, I had done something like this:
input:focus
border: 1px solid black;
-- leaving out the comma after the first selector. When I changed it to "input:focus, .editor:focus" with a comma between, it worked.
Thanks for your help.
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.