HTML:tds 的固定和可变宽度
我有一个 和许多 (34)
。
我想显示三个变量单元格,例如“name”、“hobby1”、“hobby2”,然后我需要显示 31 个单元格(每天)。
的宽度限制为大约 1000px。
在日单元格中,始终应显示长度为 3 的字符串,或者不显示任何内容。
我的问题是,即使使用 css 设置,单元格也永远不会具有相同的宽度。
前三列也可能是固定的。
我如何管理我的表格,让全天 s (1-31) 具有相同的宽度 - 无论内容是空还是 XXX?
i have a <table>
and many (34) <td>
.
I want to display three variable cells e.g. "name", "hobby1", "hobby2" and then I need to display 31 cells (for each day).
The width of the <table>
is limited to about 1000px.
In the day cells always a string of the length 3 shall be displayed or nothing.
My problem is that, the cells never have the same width even if set with css.
The first three columns may be fixed too.
How can I manage my table, that all day <td>
s (1-31) have the same width - no matter if the content is nothing or XXX?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
添加一些 CSS 就可以实现这一点。
http://jsfiddle .net/nnePW/
A couple of css additions can achieve this.
http://jsfiddle.net/nnePW/