Click here to Skip to main content
15,922,630 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have table with background color gray.

<table cellpadding="3" cellspacing="3">
<tr>
<td>some data...</td>
<td>some data...</td>
<td>some data...</td>
</tr>
<tr>
<td>some data...</td>
<td>some data...</td>
<td>some data...</td>
</tr>
</table>
I want to add some space without adding empty TR at start of table. how it is possible in CSS?


<table cellpadding="3" cellspacing="3">
---------need space here..................
<tr>
<td>some data...</td>
<td>some data...</td>
<td>some data...</td>
</tr>
<tr>
<td>some data...</td>
<td>some data...</td>
<td>some data...</td>
</tr>
</table>

Hope you understand!
Posted

Hi,

Add table header that spans through all cells like this...
HTML
<th colspan="3">
	<h3>We have space here</h3>
</th>
 
Share this answer
 
Hello,

try this

XML
<table cellpadding="3" cellspacing="3">
     </br>
     </br>
<tr>
      <td>some data...</td>
      <td>some data...</td>
      <td>some data...</td>
</tr>
<tr>
      <td>some data...</td>
      <td>some data...</td>
      <td>some data...</td>
</tr>
</table>


Thanks!!
 
Share this answer
 

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