Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Merging table column into single cell

Tags:

I have a table that looks like this and this is its markup

______________________ _____|_______|________ _____|_______|________  <table> <tbody> <tr>  <td>row 1 column 1</td>  <td>row 1 column 2</td>  <td>row 1 column 3</td> </tr> <tr>  <td>row 2 column 1</td>  <td>row 2 column 2</td>  <td>row 2 column 3</td> </tr> </tbody> </table> 

How can I merge the entire second column into 1 cell so the table looks like this. Is it possible?

_____________________________ ________|          |_________ ________|__________|_________ 
like image 307
zmol Avatar asked Feb 05 '11 01:02

zmol


People also ask

Can you merge data from two cells into one?

Copy the cell with the CONCATENATE formula (D2). Paste the copied value in the top-left cell of the range you want to merge (A2). To do this, right click the cell and select Paste Special > Values from the context menu. Select the cells that you want to join (A2 and B2) and click Merge and Center.


1 Answers

<table> <tbody> <tr>  <td>row 1 column 1</td>  <td rowspan="2">row 1 column 2</td>  <td>row 1 column 3</td> </tr> <tr>  <td>row 2 column 1</td>  <td>row 2 column 3</td> </tr> </tbody> </table> 

This should work. Any element with rowspan="2" will span two rows. you can also put colspan="2" to span columns.

like image 67
Matt Eskridge Avatar answered Sep 19 '22 15:09

Matt Eskridge