We Recommend

CSS: The Definitive Guide CSS: The Definitive Guide
Provides you with a comprehensive guide to CSS implementation, along with a thorough review of all aspects of CSS 2.1. Updated to cover Internet Explorer 7, Microsoft's vastly improved browser, this new edition includes content on positioning, text wrapping (nowrap), lists and generated content, table layout, user interface, paged media, and more.


Posted By

dhjapan on 12/12/07


Tagged

css width Expression height


Versions (?)


Who likes this?

3 people have marked this snippet as a favorite

heinz1959
basicmagic
stoker


max/min-width & max/min-height


Published in: CSS 


URL: http://perishablepress.com/press/2007/01/16/maximum-and-minimum-height-and-width-in-internet-explorer/

max/min-width & max/min-height pour IE

  1. /***** this sets the max-width value for all *****/
  2. div#division {
  3. max-width: 777px;
  4. }
  5.  
  6. /***** this sets the max-width value for IE *****/
  7. * html div#division {
  8. width: expression( document.body.clientWidth > 776 ? "777px" : "auto" );
  9. }

Report this snippet 

You need to login to post a comment.