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?
To override the CSS properties of a class using another class, we can use the ! important directive. In CSS, ! important means “this is important”, and the property:value pair that has this directive is always applied even if the other element has higher specificity.
Override CSS style in HTML (All type CSS) To only way to override inline style is by using ! important keyword beside the CSS rule.
Overriding the Base Styles scss . In order to override a base style file, you need to copy over the chain of files that is used to import it.
The only way to override the properties specified in a style
attribute is to use !important
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With