I have an odd situation which I’m trying to improve. I have HTML content that displays fine on my web page, but not on others. I define a style in my page, which I apply to the <img> tag to limit its width, and it works great.
What I would like, though, is to have inline CSS on my <img> tag that basically says “hey, if that style I specified doesn’t exist, do this instead”. Is there any way to do that?
(for those who are curious, this is for content that can be republished elsewhere, and I have no control over the CSS on the other pages)
Update
Perfect, the !important rule was exactly what I needed. Thanks to everyone who answered.
css:
html:
the img border color will be red, unless the stylesheet is not present, when it will default to blue.
See example: http://jsfiddle.net/GyR6N/