This page's ID: 25116
Welcome to the OZONE Asylum FAQWiki! Frequently Asked Questions CSS
Based on this article: http://www.svendtofte.com/code/max_width_in_ie/ the following solution was suggested in our Max-Width in IE thread:
<html> <head> <style type="text/css"> #CssSelector { /* for Firefox, Opera and others: */ max-width: 250px; } </style> <!--[if gte IE 5]> <style type="text/css"> #CssSelector { /* For Internet Explorer: */ width: expression(Math.min(parseInt(this.offsetWidth), 250 ) + "px"); } </style> <![endif]--> </head> <body> <div id="CssSelector">...</div> </body> </html>
For more information on IE's "dynamic properties":
For more information on IE's "conditional comments":
The JavaScript functions used inside the expression are:
(Created by kuckus on 02-25-2005 20:23) (Edited by poi on 02-26-2005 18:47) (Edited by kuckus on 02-26-2005 20:08)
« Backwards — Onwards »