html表帮助设计它 [英] html table help for design it

查看:339
本文介绍了html表帮助设计它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想制作这张桌子但是想把线条或图片放在2 td



这里是我的表格代码



i wanna make this table but wanna put line or picture between 2 td

here is my table code

<table>
<tr>
<td>Cell</td>

<td>Cell</td>

</tr>

</table>









i想要这样做http://www.codingforums.com/attachments/html-and-css/15103d1449323185-html-table-help-68c5dbcc10d8845eca79979ec4c7d534-png





i wanna make it like that way http://www.codingforums.com/attachments/html-and-css/15103d1449323185-html-table-help-68c5dbcc10d8845eca79979ec4c7d534-png

推荐答案

简单的方法是插入另一个像这样的像素宽的td:



The easy way is just to insert another td that's just a pixel wide like this:

<td style="background-color:#ff2020; width:1px">&nbsp;</td>





或者,您可以添加边框左边的样式到这样的第二个td:





or, you could just add the style for border-left to the second td like this:

<table>
<tr>
<td style="width:150px; text-align:center;">Cell 1</td>
<td style="width:150px; text-align:center; border-left:1px solid red;">Cell 2</td>
</tr>
</table>





无论哪种方式,更清晰的路线都是使用样式表和类。



Either way, the cleaner route would be to use a stylesheet and classes.


这篇关于html表帮助设计它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆