Elphrian
Elphrian

Reputation: 71

How to split Row into multiple Columns?

How to split single row into multiple column in html????

  | Status |            Data           |
  |  A     |             1             |
  |  B     |             2             |
  |  C     |             3             |
  |  D     |             4             |
  |            Add New Row             |
  | Daily  | Weekly | Monthly | Yearly |
  |   2    |    4   |    2    |   6    |

How can I do that in my table??

Any one help me?

Upvotes: 0

Views: 4703

Answers (1)

Dan
Dan

Reputation: 66

One possible solution would be to use the colspan for your table. For example:

<table style="width:500px;text-align:center">
<tr style="background-color:lightgrey">
  <td>Status</td>
  <td colspan="3">Data</td>
</tr>
<tr style="background-color:lightgrey">
  <td colspan="4">Add New Row</td>
</tr>
<tr style="background-color:lightgrey">
  <td>Daily</td>
  <td>Weekly</td>
  <td>Monthly</td>
  <td>Yearly</td>
</tr>
</table>

the style tags are simply in there to make it visual

hope this helps a bit. For more information have a look at http://www.w3schools.com/html/html_tables.asp

Cheers, Dan

Upvotes: 2

Related Questions