开发者

When zooming in, why does the footer overlap its preceding content

开发者 https://www.devze.com 2023-02-05 20:49 出处:网络
here is the sample开发者_如何学运维 html: <div id = \"mainWrapperDiv\"> <div id = \"mainDiv\">

here is the sample开发者_如何学运维 html:

<div id = "mainWrapperDiv">
    <div id = "mainDiv">
        <div> testing </div>
    </div>
 </div>
 <div id = "footerDiv">
 </div>

its css:

*
{
    padding:            0px;
    margin:             0px;
}

body, html
{
    height:             100%
}

div
{
    border:             none;
}

#mainWrapperDiv 
{
    min-height:         100%;
    height:             100%;
    margin-bottom:      -200px;
} 

#mainDiv  
{

    margin:             0px auto 0px auto; 
    width:              1000px;
    min-height:         500px;
    background:         lightgreen;
}



#footerDiv
{
    height:             200px;
    width:              100%;
    position:           relative;
    clear:              both;
    background:         lightblue;
}


What sticky footer are you using? What does your code look like? You could try

http://www.cssstickyfooter.com/


Because the position is set to relative. and also the margin-bottom: -200px;


It's because of your margin-bottom in the #mainWrapperDiv. If you take that out it appears to work okay. Check it out http://jsfiddle.net/kA6XJ/

0

精彩评论

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