将整个表格对齐页面底部

时间:2012-07-11 16:55:20

标签: html css

我使用以下编码来对齐底部的表,但它无法正常工作

<!DOCTYPE html>
  <html>
    <head>
      <title></title>
    </head>

    <body bgcolor="black">
      <div class="footer">
        <table border="1" bottom="0px">
          <tr>
            <td width="600px" align="right">
              <input type="image"  align="center" id="verify1" src="proceed1.png" disabled="disabled"  width="90" height="90""/>
            </td>
            <td width="500px" align="right">
              <label id = "l2"  style = "color:white;font:normal 20px chalkdust;">NEXT QUESTION</label>
              <div id="sample4" style="float: right;">
            </td>
            <td>
              <input type="image" id="next" src="arrow.png"  disabled="disabled" name="image2" width="80" height="80">
            </td>
          </tr>
        </table>
      </div>
  </body>
</html>

任何人都可以帮助它在页面底部对齐。

2 个答案:

答案 0 :(得分:5)

在CSS中使用底部对齐。这将仅对齐div而不是表格。你的表将对齐,因为它在div中。

position: absolute;
bottom:0px;

答案 1 :(得分:0)

你应该为你的页脚div分配一个绝对位置或位置固定,底部0和左边0以及宽度和高度

see here jsfiddle

或google粘性页脚,以防上述内容无法满足您的需求