Skip to content Skip to sidebar Skip to footer

Content Pass Over A Fixed Header

In my html page, i fixed my header with : position : fixed When i scroll down, then content of my page pass over the header. How can i fix this?

Solution 1:

Assuming your HTML is the following:

<div id="header">...</div>
<div id="content">...</div>

Try the following CSS:

<styletype="text/css">#header {
    position:fixed;
    z-index:1;
  }
  #content {
    position:relative;
    z-index:2;
  }
 </style>

Post a Comment for "Content Pass Over A Fixed Header"