内容占位符的问题 [英] problem with content place holder

查看:90
本文介绍了内容占位符的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题是我有内容占位符,也有页脚,而我向下移动了内容占位符,它与页脚重叠.页脚不会向下移动.

在aspx

problem is that i have the content place holder and also footer my i moves down the content place holder it overlapps the footer. footer does not move down.

in aspx

<div id="centralArea" style="z-index: 103; left: 151px; width: 998px; position: absolute; top: 168px; height: 243px"> &nbsp;<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
       <br />
       <br />
       <br />
       <br />
           <br />
           <br />
           <br />
           <br />
           <br />
           <br />
           <br />
           <br />
        </asp:ContentPlaceHolder>
   </div>
    <!--Central Area-->
        </form>
<div id="footer" style="z-index: 106; left: -550px; position: absolute; top: -178px">

</div>



stylesheet.css





stylesheet.css



#centralArea

    {
    float:left;
    width:1000px;
    min-height:348px;
    background-attachment:scroll;
}

<pre lang="cs">#footer
{
Position:relative;
Margin:700px;
width:1000px;
height:80px;
background-image:url('footer.gif');
border:1px solid black;
}





推荐答案

不要混合使用内联样式和CSS.您应该将CSS与实际布局分开.

即使您在CSS中指定了position:relative,它也会被内联样式覆盖,并将其设置为position:absolute.
Don''t mix inline styles and CSS. You should separate the CSS from the actual layout.

Even though you are specifying position: relative in the CSS it is being override by the inline style and setting it to position: absolute.


这篇关于内容占位符的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆