Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Shadow not showing up

Tags:

css

shadow

I am trying to place shadows in one of the div and it's not showing up. Here is one div where I am trying to implement the shadow:

#intro {     padding: 0px;     margin: 0px auto;     width: 100%;     float:inherit;     overflow: hidden;     height: 800px;     position:inherit;     background-color: #00b3e1;;      box-shadow: 0 0 50px rgba(0,0,0,0.8); } 

Here is the URL: http://rachelchaikof.com/awareness/

like image 318
user1869585 Avatar asked Dec 07 '12 23:12

user1869585


People also ask

Why box shadow not showing?

The reason you can't see the shadow is because the next div (#one) is directly below it, and the shadow is rendering beneath #one. Remove the background image from #one and the shadow becomes visible.

Why drop shadow is not working?

Found the answer! Drop shadow will work when the subject and background are on separate layers.

How does drop shadow work?

In graphic design and computer graphics, a drop shadow is a visual effect consisting of a drawing element which looks like the shadow of an object, giving the impression that the object is raised above the objects behind it.


1 Answers

The reason you can't see the shadow is because the next div (#one) is directly below it, and the shadow is rendering beneath #one. Remove the background image from #one and the shadow becomes visible.

Add this to #intro's CSS to make the shadow visible:

position: relative; z-index: 10; 

If you want shadows visible on the other text areas, you'll need to adjust their z-index values as well, with the top element (#intro) having the highest value.

like image 136
Chris Herbert Avatar answered Sep 21 '22 02:09

Chris Herbert