Donny P Donny P - 1 year ago 51
CSS Question

Make a fixed position element appear behind a static position element

How can you make an element that has a

position: fixed
display behind an element with
position: static
? Changing z-index doesn't seem to matter since they are not absolute.

Answer Source

You can use negative z-index on the fixed element.

<div id="fixed">This is fixed</div>
<div id="static">This is static</div>

#fixed {

Fiddle Demonstration

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download