I know attribute selectors e.g. input[name].
Is there something similar for style attributes like div[style|float]?
I know attribute selectors e.g. input[name].
Is there something similar for style attributes like div[style|float]?
Yes and no.
div[style="float-right"] {}
will work in theory. Further reading:-
coothead
Sorry, but not. Works div[style*=float], but this is not really optimal I think.
Sure. But point is: inline-style couldn’t be overrided with another class somewhere in code. And sometimes that is required.
The fact you are asking this question rings alarm bells.
The only way to override in-line styles in CSS is with !important
, which is yet further down a slippery slope, that you climb down at your peril.
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.