Question

I have 2 div:

<div id="one"></div>
<div id="two"></div>

Normally the 2nd is over the first. But I want the first to stay in front with zorder:

div {
    position: absolute;
    width: 100px;
    height: 100px;
}

#one {
    top: 20px;
    left: 20px;
    background: red;
    zorder: 2;
}

#two {
    top: 50px;
    left: 50px;
    background: blue;
    zorder: 1;
}

Why does this not work?

Était-ce utile?

La solution

This is HTML and so I guess you meant z-index:

#one {
    z-index: 2;
}

#two {
    z-index: 1;
}
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top