PDA

View Full Version : rowspan to the right



BubikolRamios
Mar 3rd, 2008, 06:37 PM
this produces:

http://shrani.si/f/1z/yo/3TjXWzcV/tabelce.jpg

how to move "a" column to the right side of the rest of table ?



<table>
<tr>
<td rowspan = 3> a </td>
</tr>
<tr>
<td> b1 </td>
<td> b2 </td>
</tr>
<tr>
<td> b3 </td>
<td> b4 </td>
</tr>
</table>

jcdevelopment
Mar 3rd, 2008, 06:47 PM
do you mean this?



<table>
<tr>
<td> b1 </td>
<td> b2 </td>

</tr>
<tr>
<td> b3 </td>
<td> b4 </td>

</tr>
<tr>
<td rowspan = 3> a </td>

</tr>
</table>


like to reflect that image by having "a" on the right instead of the left?

BubikolRamios
Mar 3rd, 2008, 06:51 PM
your sample does not work 'a' falls belov the rest of table, not to the right.
allso a should keep same dimensions as it has on image.

VIPStephan
Mar 3rd, 2008, 07:26 PM
Your table is incorrect. You must have an equal number of cells in each row. The value (number) of any rowspan or colspan attribute must match the cells in other rows or that same row. That means your table should look like this to have a rowspan in the first column (note that I’ve added two table cells that were missing in the first row):



<table>
<tr>
<td rowspan="3"> a </td>
<td></td>
<td></td>
</tr>
<tr>
<td> b1 </td>
<td> b2 </td>
</tr>
<tr>
<td> b3 </td>
<td> b4 </td>
</tr>
</table>


The second and third row have only two table cells because the first one is merged through that rowspan, i.e. the rowspan takes the place of these cells in the other rows.

Now, to get the rowspan at the right you just need to put it in the third column instead of the first:



<table>
<tr>
<td></td>
<td></td>
<td rowspan="3"> a </td>
</tr>
<tr>
<td> b1 </td>
<td> b2 </td>
</tr>
<tr>
<td> b3 </td>
<td> b4 </td>
</tr>
</table>