Avatar billede mads375 Juniormester
17. september 2007 - 11:22 Der er 2 kommentarer og
1 løsning

skygge på tabel

Hejsa.

Kan man sætte skygge på en tabel i dreamweaver eller skal man lave det i photoshop og sætte ind??

Med Venlig Hilsen
Mads
Avatar billede miss-g Seniormester
17. september 2007 - 16:07 #1
Photoshop ;-)
Avatar billede mads375 Juniormester
17. september 2007 - 19:49 #2
takker:-)
Avatar billede olebole Juniormester
19. september 2007 - 01:23 #3
<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>
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Kurser inden for grundlæggende programmering

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester