html - How to make box shadow stay when you add another div below it? -
the navbar on website has box shadow below it, reason when add div below (which giant image), box shadow on navbar dissapears , it's if image overlaps navbar, or @ least box shadowing of it. below 2 images showing mean.
without div/image below - http://puu.sh/3iw9f.png div/image below - http://puu.sh/3iwbx.jpg
i tried messing around z-index, got no luck. there i'm doing wrong?
<div id="navbar"> <a href="#">link</a> <a href="#">link</a> <a href="#">link</a> <a href="#">link</a> <a href="#">link</a> <a href="#">link</a> </div> <div id="images"> <img src="image/image1.jgp" /> </div>
#navbar {width:100%;padding:10px 0px;text-align:center;z-index:100;box-shadow: inset 0 1px #fff, 0 1px 3px rgba(34,25,25,0.4);-moz-box-shadow:0 1px 3px rgba(34,25,25,0.4);-webkit-box-shadow:0 1px 3px rgba(34,25,25,0.4);} #navbar {text-decoration:none;padding:5px 10px;border:1px solid #fff;font-size:16px;font-family: 'source sans pro', sans-serif;color:#3f3f3f;font-weight:900;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;} #navbar a:hover {background:#f26311;border:1px solid #e0570f;color:#fff;text-shadow:0px 2px 2px #e0570f;} #images {width:100%;}
you try contain them both in div.
<div id="wrap"> <div id="navbar"> </div> <div id="images"> </div> </div<
then put shadow on wrap should show on bottom of images. or add wrap
div.
also option instead of containing them in div. add padding on navigation , position:relative; top:x;
image div.
hope helps.
Comments
Post a Comment