html - CSS positioning with IE8 - expressions not supported -



html - CSS positioning with IE8 - expressions not supported -

i have next code:

<html> <head> <style type="text/css"> div#left { z-index: 100; position:absolute; left:0px; top:0px; width: 100px; height: 100px; background-color: #e7e7e7; } div#right { z-index: 100; position:absolute; left:100px; top:0px; width: 100px; height: 100px; background-color: #e20074; } </style> </head> <body> <div id="left"> 1 </div> <div id="right"> 2 </div> </body> </html>

but need right div section expanded end of page (width=100%) here how changed width div#right:

width: expression(parseint(document.body.offsetwidth)-100);

unfortunately, doesn't work ie more! ie8 , firefox ignore expressions. how can overcome issue?

many in advance!

you shouldn't utilize css expressions - they're slow, old, , importantly, proprietary, meaning won't work on other ie.

here's simple solution works on firefox, ie8 , ie7 [but not ie6 though]: give right div right: 0 forcefulness div expand out way end of page:

#right { position: absolute; left: 100px; top: 0; right: 0; height: 100px; }

see: http://jsfiddle.net/heevy/

if you're using expressions anything, it's improve off utilize javascript accomplish same effect.

html css internet-explorer internet-explorer-8

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -