View Single Post
Old 07-26-2014, 03:25 PM   #12
maverickstruth
Backup Goalie
 
maverickstruth's Avatar
 
Join Date: Mar 2006
Location: Calgary
Exp:
Default

What about using a CSS3 attribute selector, like so:

Code:
div[id^=post_message_] img { max-width: 100%; height: auto; }
(If you're not familiar with the syntax, this only targets divs with an ID of the form post_message_XXXX, regardless of what the numeric string is on the end of the ID).

Should work in all modern browsers, and even in IE7+. IE6 would be left in the cold, but it would be no worse for those users than it is at present.
maverickstruth is offline   Reply With Quote
The Following User Says Thank You to maverickstruth For This Useful Post: