Forums / Setup & design / CSS IE hack: Can't see effect in ezpublish
Ulrich L.
Wednesday 13 April 2005 5:26:34 am
Hi,
in order to set a limit to the width off the site I use the following code (besides max-width, there is additional code in order to control behaviour of IE6. Please look also here: http://www.svendtofte.com/code/max_width_in_ie/)
/* MY_CLASSES CSS */ div#allcontent { max-width:800px; width:expression(document.body.clientWidth > 800? "800px": "auto" ); }
However, I can't see the desired effect in IE. Basically the hack works well, why is it different here (in ezp)?
Paul Forsyth
Wednesday 13 April 2005 5:41:03 am
If the html/css is exactly the same it should work.
Sounds like some other css value is getting in the way or the class is not being applied to the element.
This eZ site uses the same trick:
http://www.adifo.com/
Though the element is slightly different:
width: expression((this.parentNode.clientWidth < 785+0)?"750px":"auto");
paul
Ekkehard Dörre
Wednesday 13 April 2005 6:58:22 am
Very nice Paul:http://www.adifo.com/
Greetings, ekke
http://www.coolscreen.de - Over 40 years of certified eZ Publish know-how: http://www.cjw-network.com CJW Newsletter: http://projects.ez.no/cjw_newsletter - http://cjw-network.com/en/ez-publ...w-newsletter-multi-channel-marketing
Wednesday 13 April 2005 1:32:05 pm
I just haven't got the point yet. I found out in IE the line is found and partly executed, the result is always a width with the fixed value (following my example: 800px). "auto" is never applied. I have no idea, why... Testing this code with simple html examples is no problem at all.