在一个asp.net页面的CSS粘的页脚 [英] css sticky footer in an asp.net page

查看:155
本文介绍了在一个asp.net页面的CSS粘的页脚的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个坚持到页面底部的页脚。我有:

I am trying to create a footer that sticks to the bottom of the page. I have:

<body>
    <form id="form1" runat="server">
    <div id="wrap">
        <div id="content">
            <uc2:logo ID="logo1" runat="server" />
        </div>
    </div>
    <uc1:footer ID="footer1" runat="server" />
    </form>
</body>

下面是我的CSS

body {
    margin: 30px 10px 0px 10px;
    font-size: 14px;
    font: 76% Arial,Verdana,Helvetica,sans-serif;
}
html, body, form, #wrap { height: 100%; }
form > #wrap { height: auto; min-height: 100%; }

#wrap {
    width: 1000px;
    margin: auto;

}

#content {

    text-align:left;

}


#footer {
 clear: both;
 position: relative;
 z-index: 10;
 width:1000px;
 margin:auto;
}

我在想什么?页脚出现在视窗(滚动条也是页)以下。我期待它是某种类型的保证金问题。

What am I missing? The footer appears below the viewport (scrollbars are also on the page). I'm expecting it to be some type of margin issue.

推荐答案

看看这个:<一href=\"http://matthewjamestaylor.com/blog/keeping-footers-at-the-bottom-of-the-page\">http://matthewjamestaylor.com/blog/keeping-footers-at-the-bottom-of-the-page

这篇关于在一个asp.net页面的CSS粘的页脚的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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