Question: I am trying to make a fixed header by putting my header content inside a div with a fixed position. Below is the CSS code for the div:

```
#page_header {
    background-color: white;
    height: auto;
    width: 100%;
    position: fixed;
    overflow: auto;
}

```

and this is the effect of my div, (screenshot of the left top corner):
[![left top corner of the div](https://i.stack.imgur.com/sqp9g.png)](https://i.stack.imgur.com/sqp9g.png)

You can clearly see that there is a space between the div(white part) and the page, while it is not the case on the right side, how should I get rid of this space?

Thanks.

Answer: 
You need to make sure that your margins and padding are zeroed:

```
margin: 0;
padding: 0;

```

Moreover, if you really want the thing fixed in place, the best thing is to lock it there.

```
position: fixed;
top: 0;
left:0;

```
You need to set the actual page to margin:0 and padding: 0 to the actual html, not just the body.

use this in your css stylesheet.

```
*, html {
margin:0;
padding:0;  
}

```

that will set the whole page to 0, for a fresh clean start with no margin or paddings.