Hi!
Sorry for my bad english.
Darkening page in ie doesn't work well. On the left side there is part of the site that isn't covered with dark! In firefox this is well, whole page is covered, but in ie not.
Thanks.
(There is an attachment).

Recommended Answers

All 2 Replies

When you want to darken a page, you place the following HTML right after the <body> tag:

<div id='darkscreen' style='position:fixed; top:0px; left:0px; color:black; opacity:0.5; filter:alpha(opacity=50); width:100%; height:100%;'></div>

If you want to toggle its display, you can use:

document.getElementById('darkscreen').style.display = 'inline'; // Show
document.getElementById('darkscreen').style.display = 'none'; // Don't Show

~G

Yes. I made this.
I found solution:
Here's the code:

<html>
<head>
<title>Stranica</title>
</head>
<body>
<style type="text/css">
#tama{
background-color: rgb(0, 0, 0);
opacity: 0.7;
filter: alpha(opacity=70);
height: 100%;
width: 100%;
_width:102%;
position:fixed;
_position:absolute;
top: 0px;
_top:expression(eval(document.body.scrollTop));
left:0px;
}
</style>
<script type="text/javascript">
function d(){
document.getElementById('tama').style.display="block";
}
function n(){
document.getElementById('tama').style.display="none";
}
</script>
<input type="button" value="Open" onclick="d()">
<div id="tama" style="display:none;">
<p align="right"><input type="button" onclick="n();" value="Close"><br>
</p>
</div>
</body>
</html>

Now is the whole site covered in firefox and in ie.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.