我找不到错误,在最后1小时尝试这个。 这是第http://kushke.5gbfree.com/SecondPage.html页 我想中心"待办事项列表"头
table {
border: 3px solid orange;
background-color: yellow;
width: 100%;
text-align: center;
}
td, th {
color: black;
border: 2px dashed black;
}
#th1 {
padding-right: 160px;
text-align: center;
}

<table>
<tr>
<th id="th1" nowrap><h3>To do list</h3></th>
<th><h3>Done</h3></th>
<th><h3> Hard</font></h3></th>
</tr>
</table>
&#13;
答案 0 :(得分:4)
问题似乎是
SELECT
a.job_id,
CONCAT( s.name, ' ', s.family ) AS service_provider,
CONCAT( c.name, ' ', c.family ) AS customer
FROM action a
INNER JOIN tablesite s
ON a.service_provider = s.id_user
INNER JOIN tablesite c
ON a.customer_id = c.id_user
如果您需要填充,请将其添加到th:
的两侧#th1 {
padding-right:160px;
}
答案 1 :(得分:2)
您不应该使用padding属性来保持表格列的某个宽度。通过添加padding
属性,您将失去中心对齐。
所以,删除
#th1 {
padding-right: 160px;
align: center;
}
并将其替换为以下代码:
#th1 {
width: 180px;
padding: auto;
}
当然,您可以通过修改上面代码段的值来设置自定义宽度。
答案 2 :(得分:1)
答案 3 :(得分:1)
由于你的帮助,我已经解决了这个问题。
不需要进一步的评论,但如果你想要upvotes,写任何东西, 我会回复。
祝你好运!