Topic: Max-Width in IE (Page 1 of 1) |
|
---|---|
Paranoid (IV) Mad Librarian From: Glienicke |
![]() If this trick isn't old news for everybody then check this link: code: max-width: 1024px;
|
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
![]() But it's not standard-compliant code! What if, in the future, a new CSS feature with the name "expression" came along which worked differently than IE's current implementation? This code would break and need to be fixed. When writing code that's meant to work in broken browsers, it must be remembered that first priority is to write code that, when read by the "perfect" browser, will have no errors. |
Paranoid (IV) Inmate From: France |
![]() |
Paranoid (IV) Mad Librarian From: Glienicke |
![]() OK, that's a point! As a workaround, how about putting the 'width: expression(...)' into conditional comments? That way, IE would ignore the standard 'max-width' and the perfect browser would ignore the comments. code: <!--[if IE 5]>
|
Paranoid (IV) Inmate From: France |
![]() A cleaner method is : code: <!--[if gte IE 5]> It works in IE6. I no longer have IE5.01 and IE5.5 on my computer |
Paranoid (IV) Mad Librarian From: Glienicke |
![]() Some more links in the FAQ: quote:
|
Paranoid (IV) Inmate From: France |
![]() |
Paranoid (IV) Mad Librarian From: Glienicke |
![]() ah. almost suspected you would have heard of them already |
Paranoid (IV) Inmate From: France |
![]() |
Obsessive-Compulsive (I) Inmate From: San Francisco |
![]() I was able to get the IE resizing to work, but had some issues. |
Nervous Wreck (II) Inmate From: San Francisco |
![]() An update on my last post: code: width:expression(document.body.clientWidth > Math.min(screen.width,1024) ? Math.min(screen.width,1024) + "px": "auto" );
|