IE8 max-width, max-height, and inline IE8 css hacksPosted in How To's on November 12th, 2012 by Maurice Kindermann
Is your max-width or max-height css not working in IE8? Neither was mine. I found plenty of hacks and ways around it, but none of them solved the issue once and for all.
One great little snip-it I found along the way was how to add inline hacks to the CSS file, for example:
width:200px\9; /* ie8 and earlier */ height:200px\9; /* ie8 and earlier */
You can use that, or \8 for IE7 and previous, etc. Great little trick.
BUT, the real culprit? The doctype! Apparently IE8 doesn’t recognise this:
But it DOES recognise this: