Thank our lucky stars, we CAN override inline styles directly from the stylesheet. Take this example markup:
Eg 1:
<div style="background: red;">
The inline styles for this div should make it red.</div>
div[style] {
background: yellow !important;
}
Eg 2:
<div class="block">
<span style="font-weight: bold; color: red;">Hello World</span>
</div>
.block span[style]{
font-weight: normal !important;
color: #000 !important;
}
Unfortunately the down side of this is technique is that it will not
work on IE6 and below, but it does work in IE7, IE8, Fire Fox, Safari,
and Opera.
Thanks buddy, you saved my time :)
ReplyDelete