惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Microsoft Security Blog
Microsoft Security Blog
Apple Machine Learning Research
Apple Machine Learning Research
美团技术团队
WordPress大学
WordPress大学
酷 壳 – CoolShell
酷 壳 – CoolShell
G
Google Developers Blog
阮一峰的网络日志
阮一峰的网络日志
The Cloudflare Blog
J
Java Code Geeks
Martin Fowler
Martin Fowler
M
MIT News - Artificial intelligence
IT之家
IT之家
博客园 - 三生石上(FineUI控件)
月光博客
月光博客
Google DeepMind News
Google DeepMind News
小众软件
小众软件
V
V2EX
Hugging Face - Blog
Hugging Face - Blog
爱范儿
爱范儿
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Jina AI
Jina AI
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
腾讯CDC
B
Blog

博客园 - loverain

透不过气 2017年终总结 linux shell中单引号、双引号、反引号、反斜杠的区别 linux系统/var/log目录下的信息详解 SQL 显示表名显示列名 outlook署名最后一行没换行 CSS3下的渐变文字效果实现 SSH(poderosa)を使って、さくらのMySQLサーバーに接続する方法 内网IP外网IP的关联及访问互联网原理 用EXCLE群发outlook邮件 本地开发环境搭建(windows) html绝对路径,相对路径 各种进制问题 在浏览器地址栏按回车、F5、Ctrl+F5刷新网页的区别 利用googleapis在日文系统中改善中文字 在共有文件夹中删除某个人的权限的方法 博文阅读密码验证 - 博客园 関係ない話だけど 博文阅读密码验证 - 博客园
在css嵌套中的html的table里的字左右不对齐
loverain · 2016-12-15 · via 博客园 - loverain

【现象】AAAA与天数的数字左右不居中

<table border=1 align="center">
<tr>
<td width="20%" align="center">AAAA</th>
<td width="10%" align="center">周一→周二</th>
<td width="10%" align="center">周二→周三</th>
<td width="10%" align="center">周三→周四</th>
<td width="10%" align="center">周四→周五</th>
<td width="10%" align="center">周五→周一</th>
</tr>

<tr>
<td width="20%" align="center">天数</td>
<td width="10%" align="center">1</td>
<td width="10%" align="center">1</td>
<td width="10%" align="center">3</td>
<td width="10%" align="center">1</td>
<td width="10%" align="center">1</td>
</tr>
</table>

【解决方法】

<table border=1 align="center">
<tr>
<td width="20%" align="center" style="vertical-align:middle;">XXXX</th>
<td width="10%" align="center">周一→周二</th>
<td width="10%" align="center">周二→周三</th>
<td width="10%" align="center">周三→周四</th>
<td width="10%" align="center">周四→周五</th>
<td width="10%" align="center">周五→周一</th>
</tr>

<tr>
<td width="20%" align="center">XXXXXXX天数</td>
<td width="10%" align="center" style="vertical-align:middle;">1</td>
<td width="10%" align="center" style="vertical-align:middle;">1</td>
<td width="10%" align="center" style="vertical-align:middle;">3</td>
<td width="10%" align="center" style="vertical-align:middle;">1</td>
<td width="10%" align="center" style="vertical-align:middle;">1</td>
</tr>
</table>

参考

http://www.webhek.com/vertical-align/