In case you don’t know, CSS expressions were actual bits of JavaScript that you could run from CSS rules; this was commonly used to simulate the CSS max-width property for IE:

 
CSS:
  1.  
  2. div.someClass {
  3. /* Internet Explorer */
  4. width: expression(document.body.clientWidth> 600) ? "600px" : "auto";
  5. /* Standards-compliant browsers */
  6. max-width: 600px;
  7. } 

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

  4 Responses to “IE8: CSS Expressions are no longer supported in Standards Mode”

  1. The good news about this is that IE8 now supports max-width etc so you shouldn’t need to use it for that.

    But on the other hand – it was a handy work-around for IE rendering problems :(

  2. Stewart: the only problematic Microsoft browser Re CSS 2.1 max-width property is IE6 used by approximately 25% of people currently online. For IE7 and 8 it works perfectly fine.

    See the CSS 2.1 minimum and maximum height and width test case results for IE. 3 versions tested, IE6-8.

  3. Sorry. max- and min-width don't work for me at all with IE8, compatibility mode or not. No matter what doctype (html and xhtml tested). Neither do CSS expressions.

  4. Actually, IE8 max-width is not properly working on 1360x700px resolution.

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

 
© 2012 eric.polerecky.com Suffusion theme by Sayontan Sinha