html - Simple CSS z-index example not working -


i'm trying make simple html 2 images 1 above other on z-index:

<html>     <head>         <title>test</title>         <style type="text/css">             {                 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 z-index not working?

you forgot add # before ids in css.

#back { ... } #front { ... } 

Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -