![](/img/trans.png)
[英]Is it possible in HTML & CSS alone to align a table caption to the top AND bottom of the table?
[英]CSS: Align table to top
我有一個頁面,容器在一個表中,我需要將它對齊到頁面的最頂部,但是有一個差距。 還需要水平居中頁面。
我試過了
body {
margin:0px;
padding:0px;
}
嘗試:
html, body {
border: 0px;
margin: 0px;
padding: 0px;
}
table {
margin: 0px auto;
}
這可能會奏效。
* {margin:0; padding:0;}
table#idName {
margin:auto;
}
div的第一個子元素是什么? 您是否已將該元素的頂部邊界歸零(或給div一個小的頂部填充或邊框)?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.