Click here to Skip to main content
15,892,161 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i wanna make this table but wanna put line or picture between 2 td

here is my table code

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

<td>Cell</td>

</tr>

</table>




i wanna make it like that way http://www.codingforums.com/attachments/html-and-css/15103d1449323185-html-table-help-68c5dbcc10d8845eca79979ec4c7d534-png
Posted
Updated 5-Dec-15 3:15am
v2

1 solution

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>


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.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900