开发者

Box Shadow Doesnt go on Entire Wrapper

Im Using

.shadow {
    -moz-box-shadow: 3px 3px 4px #000;
    -webkit-box-shadow: 3px 3px 4px #000;
    box-shadow: 3px 3px 4px #000;
    /* For IE 8 */
    -ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color='#000000')";
    /* For IE 5.5 - 7 */
    filter: progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color='#000000');
}

To add a shadow to my #Wrapper. For some reason it only travels to the end of my menu. Can anyone see why in this example http:/开发者_如何学Python/www.kerrydean.ca/MATHESON/home5.html

Thanks!!


The issue is that you've got floated content inside of non-floated content. You need a clearfix.

Alternatively, you could float your #Wrapper element, but you can't center a floated element with margins. Here's an example:

<style type='text/css'>
  #Wrapper {
    margin: 0 auto;
    width: 799px;
  }

  #Page {
    float: left
  }
</style>

[ snip... ]

<div id='Wrapper'>
  <div id='Page' class='shadow'>
    [ The rest of your content goes here. ]

Your footer is also going to cause problems because you moved it via relative positioning. Get rid of that and give it a 10px top margin, and you should be all set.


based on the way you have arranged the layout, you'll need to adjust the way you style #Wrapper.

this aught to do it:

#Wrapper {
    background-color: #FFFFFF;
    float: left;
    left: 50%;
    margin: 0 -400px;
    padding-bottom: 13px;
    position: relative;
    width: 799px;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜