Question: i need to make a div position absolute and make it in center but i used does not make it happen. i have gone crazy trying to make it to the center. 
i have tried using left and right value to 0. it should have made the div to the center automatically.
need to figure out what went wrong?

help please!

here is the code that i have tried and stuck

```
.slider-wrap {
    width: 1000px; 
    height: 500px; 
    left: 0; 
    right: 0; 
    top: 100px;
    background: #096; 
    z-index: 99; 
    margin: 0 auto;
}

```

Answer: 
You forgot to set the position to absolute

```
 .slider-wrap {
    width: 1000px; 
    height: 500px; 
    left:0; right:0; 
    top:100px; 
    background:#096; 
    z-index:99; 
    margin:0px auto;
}

```

Add `position:absolute;`

```
 .slider-wrap {
    position:absolute;
    width: 1000px; 
    height: 500px; 
    left:0; right:0; 
    top:100px; 
    background:#096; 
    z-index:99; 
    margin:0px auto;
 }

```
The proper way to center a div is as such:

```
.slider-wrap {
...
margin-right: auto;
margin-left: auto;
}

```

Also note that `z-index` will not work unless you set the `position` attribute. ie: `position: absolute;`