# Z-index problems (FF)

**URL:** https://forum.kirupa.com/t/z-index-problems-ff/291193
**Category:** Uncategorized
**Created:** [June 26, 2009, 12:13am UTC](https://forum.kirupa.com/t/z-index-problems-ff/291193 "2009-06-26T00:13:46Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![sentroy](https://avatars.discourse-cdn.com/v4/letter/s/9de053/32.png) [@sentroy](https://forum.kirupa.com/u/sentroy)
#### Post date: [June 26, 2009, 12:13am UTC](https://forum.kirupa.com/t/z-index-problems-ff/291193/1 "2009-06-26T00:13:46Z")

</div>

I’m trying to create a drop shadow for a div, but i can’t see do get z-index to work correctly

```auto
<html>
<head>
    <style type="text/css">
    div.shadow {
        background: rgba(0,0,0,0.5);
        position: absolute;
        top: 5px;
        left: 5px;
        height: 100%;
        width: 100%;
        z-index: 1;
    }
    </style>
</head>
<body>
    <div style="background: blue;position: relative; z-index:2">
        TEXT HERE
        <div class="shadow"></div>
    </div>
</body>
</html>

```

I’ve tried all kinds of things, but no use.  
Tried negative numbers, huge numbers.

Using a negative z-index on the shadow works, but i’m using it inside another div on my page, so i need a non-negative way(it just hides the shadow)…
