Jump to content

Box Shadow Problem


turkspartan

Recommended Posts

Hey guys. I am having some issues with box shadow. If you go to my website, you will see that I have a shadow effect right under my slider through out the whole length of the page.If you check the same page on Ipad or phone browser it wont display properly because to make that shadow effect I used a two part code.

border-bottom:-webkit-box-shadow: -200px 8px 13px 2px rgba(0,0,0,0.5), 972px 8px 13px 2px rgba(0,0,0,0.5) ;-moz-box-shadow: -200px 8px 13px 2px rgba(0,0,0,0.5), 972px 8px 13px 2px rgba(0,0,0,0.5);box-shadow: -200px 8px 13px 2px rgba(0,0,0,0.5), 972px 8px 13px 2px rgba(0,0,0,0.5);    

So I used a two part code per line there because if I only used it regularly, the shadow only appears under the slider and not through out the entire width.I could have also used shadow effect for #slider-wrapper:before and slider #slider-wrapper:after too, but when I do that here is what happens.

#slider-wrapper {    background:url(images/slider.jpg) repeat 50% 0%;    position:relative;    overflow:visible;    padding:20px 0 19px 0;    border-bottom:-webkit-box-shadow: -0px 8px 13px 2px rgba(0,0,0,0.5);-moz-box-shadow: 0px 8px 13px 2px rgba(0,0,0,0.5);box-shadow: 0px 8px 13px 2px rgba(0,0,0,0.5);    }#slider-wrapper:before {    background:url(images/slider.jpg) repeat 50% 0%;    display:block;    width:100%;    height:100%;    overflow:hidden;    border-bottom:-webkit-box-shadow: -0px 8px 13px 2px rgba(0,0,0,0.5);-moz-box-shadow: 0px 8px 13px 2px rgba(0,0,0,0.5);box-shadow: 0px 8px 13px 2px rgba(0,0,0,0.5);        position:absolute;    top:0;    left:-100%;    z-index:1;    content:'';}#slider-wrapper:after {    background:url(images/slider.jpg) repeat 50% 0%;    display:block;    width:100%;    height:100%;    overflow:hidden;    border-bottom:-webkit-box-shadow: -0px 8px 13px 2px rgba(0,0,0,0.5);-moz-box-shadow: 0px 8px 13px 2px rgba(0,0,0,0.5);box-shadow: 0px 8px 13px 2px rgba(0,0,0,0.5);        position:absolute;    top:0;    right:-100%;    z-index:1;    content:'';}

http://i333.photobucket.com/albums/m389/turkspartan/slidershadow_zps708ada02.jpgDo you see the lines to the right and left of the slider?So.... I guess the best way to go is to have the slider wrapper, wrapper before and wrapper after to have their own shadow, but I need to get rid of the shadow it creates beside the slider.Thanks as always :)

Edited by turkspartan
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...