Ways to stick footer to the bottom a page

旧街凉风 提交于 2019-12-01 00:17:41

I'm would also recommend a div structure using floating.

Markup:

<div class="bodyWrap">
  <div class="header">
    <!-- Insert content here -->
  </div>
  <div class="content">
    <!-- Insert content here -->
  </div>
  <div class="footer">
    <!-- Insert content here -->
  </div>
  <div style="clear:both"></div>
</div>

Css:

.bodyWrap
{
 width: 500px;
}
.header, .content, .footer
{
 width: 100%;
 float:left;
}
Nasser Hadjloo

I suggest to use a div like

<div id="Footer"> content </div>

then in your css put this

#Footer
{
    position: absolute;
    bottom: 0px;
    height: 3px;
    background-color: #666;
    color: #eee;
}

or you can use AjaxControlToolkit library


I Also strongly recommand you change your layout from Table to div

I liked below better. It only works with an id and not with a class.

<div id="Footer"> content </div>    
#Footer {
                    position: fixed;
                    bottom: 0px;
        }
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!