tags:

views:

25

answers:

1

I'm trying to make a simple html with 2 images one above other on z-index:

<html>
    <head>
        <title>test</title>
        <style type="text/css">
            back {
                position: absolute;
                left: 0px;
                top:0px;
                z-index:0;
            }

            front {
                position: absolute;
                left: 0px;
                top:0px;
                z-index:1;
            }
        </style>
    </head>
    <body>
        <img id="front" src="loading.gif">
        <img id="back" src="plasma.jpg">
    </body>
<html>

but why the z-index is not working?

+7  A: 

You forgot to add # before the IDs in your CSS.

#back { ... }
#front { ... }
Deniz Dogan
+1 sounds about right!! - you're too fast :)
jim