Html 在页面底部对齐整个表格
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11437622/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Align whole table at the bottom of page
提问by Dineshkani
I use the following coding to align the table at the bottom but it can't working
我使用以下编码来对齐底部的表格,但它无法工作
<!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>
Anyone help this to align at the bottom of page.
任何人都可以帮助它在页面底部对齐。
回答by Dineshkani
Use the bottom alignment in CSS. This will align the div only and not the table. Your table will align because it is within the div.
在 CSS 中使用底部对齐。这将仅对齐 div 而不是表格。您的表格将对齐,因为它位于 div 内。
position: absolute;
bottom:0px;
回答by marius_5
you should either assign a position absolute or position fixed and bottom 0 and left 0 and width and height to your footer div
您应该为页脚 div 分配绝对位置或固定位置和底部 0 和左侧 0 以及宽度和高度
or google sticky footer in case the above doesnt satisfy your needs
或谷歌粘性页脚,以防上述不能满足您的需求