0

以下是我的粘性页脚代码,它工作正常,但我不知道为什么我的粘性页脚没有显示在中心对齐位置请让我知道如何修改它以完成我的问题......或者还有其他好的方法制作粘性页脚。谢谢,

<table width="900" height="42" border="1" align="center" style="border-style:none; position: absolute;width: 900px;vertical-align: middle;text-align: center;z-index:999999999 !important;

    bottom: 0px;

" cellpadding="0" cellspacing="0" bordercolor="#AEAEAE" bgcolor="#0C4549">
  <tr>
    <td align="center" bgcolor="#0C4549" >2012 &copy; of DND CLUB. Developed by Radiations3.
        </div></td>
  </tr>
</table>
4

4 回答 4

2

Take a look at this. Much better solution.

http://css-tricks.com/snippets/css/sticky-footer/

Also try to steer away from using tables for anything other than displaying tabular data.

于 2012-05-18T07:47:11.767 回答
0

Remove </div> in td

<table width="900" height="42" border="1" align="center" style="border-style:none; position: absolute;width: 900px;vertical-align: middle;text-align: center;z-index:999999999 !important; bottom: 0px;" cellpadding="0" cellspacing="0" bordercolor="#AEAEAE" bgcolor="#0C4549">
    <tr>
        <td align="center" bgcolor="#0C4549" >2012 &copy; of DND CLUB. Developed by Radiations3.</td>
    </tr>
</table>
于 2012-05-18T07:46:58.083 回答
0

嗨,检查一下,我希望这会起作用:-

<table width="100%" height="42" border="1" align="center" style="
position:absolute;
left:0;
right:0;
vertical-align:middle;
text-align:center;
bottom: 0px;
background:#0C4549;"
cellpadding="0" cellspacing="0">
  <tr>
    <td align="center">2012 &copy; of DND CLUB. Developed by Radiations3.
        </td>
  </tr>
</table>

演示:- http://jsfiddle.net/yFqPb/6/

于 2012-05-18T11:28:22.757 回答
0

这是另一种久经考验的粘性页脚解决方案。它使用起来非常简单,我经常使用它。

http://ryanfait.com/sticky-footer/

于 2012-05-18T10:14:45.570 回答