tags:

views:

54

answers:

2

I am trying to adjust the position of the background image of a button in CKEditor.

CKEditor hard-codes button images with background-position: 0px 0pt. I don't want to change this, as it seems to be in the editor's core.

I can, however, set a custom class for the button and style that in the style sheet. But because the background-position statement is made in the style attribute, I can't overwrite it from a class, not even using !important.

Is there any way to override a CSS property in the style= attribute in a CSS class?

I don't think there is. Anybody know any workarounds?

A: 

You can set the style with some Javascript, or (even better yet) use some JQuery to do it for you.

Dave Markle
+4  A: 

The only way to override the properties specified in a style attribute is to use !important.

Gumbo
Didn't know !important was THAT "important"! I learned something today!
Dave Markle