jlizarraga
04-23-2009, 09:00 PM
Hi all,
Using IE6 expressions for the first time today, to get around the weird problem described below.
I am making an AJAX app that will be used across a lot of sites of varying sizes. There are two main columns to this app (think WordPress, with one large column and a narrower sidebar column). You have to set the widths of these two columns to fit each site, but all of the widths after that are in percentages and ems and whatnot.
The narrow column has some tables (and yes they contain tabular data, they are not for layout), which are told via CSS to have a width of 100% and a height of 100px. In IE7+ and all other browsers, this works just fine, but IE6 makes the table 100% of the width of the column PLUS the width of the table's vertical scrollbar (~15-20px)! This causes the table to spill out of the column in IE6.
To get around this, I tried the following CSS expression in my IE6-only stylesheet:
width: expression((this.parentNode.offsetWidth - 15) + "px");
This instantly crashes IE6. The CPU and memory usage begin to skyrocket and the browser becomes totally unresponsive from this expression.
For now, I've gotten around it by setting the width to 90% in the IE6-only stylesheet, but this is a bit less than ideal as the table is not flush with the column for IE6.
Any tips greatly appreciated!
Using IE6 expressions for the first time today, to get around the weird problem described below.
I am making an AJAX app that will be used across a lot of sites of varying sizes. There are two main columns to this app (think WordPress, with one large column and a narrower sidebar column). You have to set the widths of these two columns to fit each site, but all of the widths after that are in percentages and ems and whatnot.
The narrow column has some tables (and yes they contain tabular data, they are not for layout), which are told via CSS to have a width of 100% and a height of 100px. In IE7+ and all other browsers, this works just fine, but IE6 makes the table 100% of the width of the column PLUS the width of the table's vertical scrollbar (~15-20px)! This causes the table to spill out of the column in IE6.
To get around this, I tried the following CSS expression in my IE6-only stylesheet:
width: expression((this.parentNode.offsetWidth - 15) + "px");
This instantly crashes IE6. The CPU and memory usage begin to skyrocket and the browser becomes totally unresponsive from this expression.
For now, I've gotten around it by setting the width to 90% in the IE6-only stylesheet, but this is a bit less than ideal as the table is not flush with the column for IE6.
Any tips greatly appreciated!