Autor Zpráva
ondrf
Profil *
ahoj, mám takovýto css soubor:

body
{
    padding: 0px;
    margin: 0px;
}

.layer
{
    position: absolute;
    top: 0px;
    left: 0px;
    width: 800px;
    height: 400px;
}

#l1
{
    color: Red;
    z-index: 3;
}
    
#l2
{
  color:Silver; 
  z-index:1; 
    }
    
#l3
{
 
  color:Silver;
  z-index:2;  
    }       


v tomto html souboru:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
	<head>
        <link href="game.css" rel="stylesheet" type="text/css" />
        <title></title>
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
        <script type="text/javascript">
             $(document).ready(function() {
             // This is more like it!
             });
        </script>
	</head>
	<body>
	    <div class="layer" id="l1">
	        1
	    </div>
	     <div class="layer" id="l2">
	        2
	    </div>
	     <div class="layer" id="l3">
	        3
	    </div>
	</body>
</html>


ale když tento soubro zobrazím tak červená jednička je vidět navrchu, coz by nemela ...

nevíte co s tím ?

díky :)
dan_55
Profil *
Však jednička má největší z-index tak musí být vidět navrchu
Bubák
Profil
Vidím, že DIV s id="l1" má nejvyšší z-index: 3; proto je nejvýše.
www.jakpsatweb.cz/css/z-index.html
ondrf
Profil *
jej :) dekuju

Vaše odpověď

Mohlo by se hodit


Prosím používejte diakritiku a interpunkci.

Ochrana proti spamu. Napište prosím číslo dvě-sta čtyřicet-sedm:

0