"expression()" is an IE-only addition to CSS. It looks like it's not really needed. (IE6 would need it though.)
Try this:
Main Topics
Browse All TopicsI have a web page that supports a modal pop-up div over a transparent div. It works perfectly in IE7, and fails hard in FF and Chrome. I'm looking for a way to make this cross-browser.
The CSS in question:
.modal
{
background-color: White;
visibility: hidden;
width: 50%;
z-index: 10000;
position: absolute;
border: solid 1px Black;
margin: 100px auto;
padding: 15px;
}
.transparent
{
filter: alpha(opacity=90);
-moz-opacity: 0.9;
opacity: 0.9;
visibility: hidden;
z-index: 9999;
left: 0px;
top: 0px;
/*width:expression((docume
/*height: expression((document.body.
/*width: expression(document.getEle
height: expression(document.getEle
position: absolute;
background-color: Gray;
text-align: center;
width:expression((document
height: expression((document.docum
}
full
{
height: 100%;
width: 100%;
}
The commented out sections of the CSS are approaches that I believed would work, but do not.
The HTML is as follows:
<div id="fullPageDiv" class="full">
<div id="maskingDiv" class="transparent">
<div id="modalBox" class="modal">
<uc1:Controls_ClientSelect
<div align="center">
<a class="style8black" href="javascript:void(0);"
</div>
</div>
</div>
............
<a href="javascript:void(0);"
.............
</div>
The javascript is as follows:
function showModal()
{
showMask();
document.getElementById("m
document.getElementById("m
document.getElementById("m
}
function showMask()
{
document.getElementById("m
}
function hideModal()
{
document.getElementById("m
document.getElementById("m
}
The end goal, which works correctly in IE 7 is that upon clicking the anchor, "maskingDiv" covers the entire browsable area (the page will always have a vertical scrollbar, yet may or may not have horizontal scrollbar). On that page "modalBox" will also be displayed on top of "maskingDiv". Users will not be able to click on any elements outside of the modal box until they've hidden the modal box (this will eventually be changed, but until it works in all browsers, this is the functionality).
However, in Chrome and FF, "maskedDiv" never displays, and "modalBox" is horizontally sized to about a tenth of what is necessary. Also, since "maskedDiv" does not display, there is no modality to the behavior.
Can someone help me with what I've missed?
Thanks
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: neverrealmPosted on 2009-11-04 at 13:37:41ID: 25744220
Sorry, I just noticed that the first set of commented out expressions are the working ones for IE7. The commented out one should have read:
? document.body.offsetWidth : (document.documentElement. scrollWidt h >= document.documentElement.o ffsetWidth ? document.documentElement.s crollWidth : document.documentElement.o ffsetWidth )) + "px")
width: expression ((window.pageXOffset ? window.pageXOffset : (document.body.offsetWidth
and the same for height, replacing x -> y and width -> height in all instances.