<ole>
Skrev denne her engang for længe siden:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"
http://www.w3.org/TR/html4/loose.dtd"><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>TITLE</title>
<style type="text/css">
body, html {
height: 100%;
margin: 0px;
padding: 0px;
background-color: white
}
.shadeHolder {
position: relative;
}
.shadeTBL {
position: absolute;
left: 0px;
top: 0px;
background-color: #ffffff;
}
.shader {
position: absolute;
background-color: #000080;
}
</style>
<script type="text/JavaScript">
var d=document;
function gE(id){return d.getElementById(id)}
function gA(o,tag){return o.getElementsByTagName(tag)}
function pI(s){return parseInt(s)}
// 25 - 12 - 8 - 6 - 5 - 4
function initShadeTBLs(startOpacity, steps, color) {
var aTbl = gA(d,"TABLE");
for (var i=0; i<aTbl.length; i++) {
if ( aTbl[i].className=="shadeTBL" ) doShade( aTbl[i] );
}
function doShade(tbl) {
var w, h, a, offset, opac, cont = tbl.parentNode;
w=tbl.offsetWidth; h=tbl.offsetHeight;
tbl.style.zIndex = (tbl.style.zIndex!="")? parseInt(tbl.style.zIndex)+1 : 1;
for (var i=0; i<steps; i++) {
opac = (startOpacity/(steps+1))*(steps-i);
//alert(opac)
var bla = document.createElement("div");
css = bla.style;
css.position = "absolute";
css.left = css.top = "1px"
cont.appendChild(bla);
if (bla.filters) css.filter = "alpha(opacity="+startOpacity+")";
css.width = (w+steps)+"px";
css.height = (h+steps)+"px";
insertShadow(bla, w, h, i+1, color, opac);
tbl.style.zIndex = parseInt(tbl.style.zIndex)+1;
}
cont.parentNode.style.width = (cont.parentNode.offsetWidth+1)+"px";
cont.parentNode.style.width = (cont.parentNode.offsetWidth-1)+"px";
}
function insertShadow(elm, w, h, inx, col, opac) {
var div = document.createElement("div"), css = div.style;
css.position = "absolute";
css.width = (w-2)+"px";
css.height = (h-2)+"px";
css.left = css.top = (inx+1)+"px";
css.zIndex = inx;
css.backgroundColor = col;
if (elm.filters) css.filter = "alpha(opacity="+opac+")";
else {
css.mozOpacity = opac/100;
css.opacity = opac/100;
}
elm.appendChild(div);
}
}
window.onload = function() {
initShadeTBLs(20, 3, '#000000');
}
</script>
</head>
<body>
<div class="shadeHolder">
<table class="shadeTBL" cellspacing="0" cellpadding="0" border="0" style="border:1px solid black">
<tr>
<td>Ut enim ad minim veniam, quis nostrud<br>
exercitation ullamco laboris nisi ut aliquip ex<br>
ea commodo consequat. Duis aute irure dolor in<br>
reprehenderit in voluptate velit esse cillum</td>
</tr>
</table>
</div>
</body>
</html>
/mvh
</bole>