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
Post a Comment