I have this problem and I don’t know how to fix it. In my project many html files have defined for div an width style, for example:
<div style="width:200px" id="boom">/*****/</div>
In css file if I put a condition like:
`div#boom{width:auto !important;}`
is ignored because style is defined in html for that div and from what I know html condition beat css condition.
How is possible to fix that? I don’t want to edit all html pages because I would take a long time.
You are doing something wrong. Because
!importantmakes the style the highest priority, so it always use thewidth: auto;and not the inline CSS.An live example that this works: http://tinkerbin.com/wzrFiyaq
And a tutorial: http://css-tricks.com/override-inline-styles-with-css/