Html Table - Complex Layout - Specificel
I got this table in a assignment but I'm have a hard time replicating it: (source: evc-cit.info) I can't seem to get the Xpath cell and the XSL transformation cell to share the 1
Solution 1:
I came here with same doubt, even though it has been answered but its not a great explanation, so it took me a long time to solve this.You need to put XLS transformations in third row, not in second row. Please see the code below.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="description" content="">
<meta name="keywords" content="">
<title>Table Practice</title>
</head>
<body>
<table border="1" align="center" cellpadding="10px">
<thead>
<tr>
<th rowspan="3">Day</th>
<th colspan="3">Seminar</th>
</tr>
<tr>
<th colspan="2">Schedule</th>
<th rowspan="2">Topic</th>
</tr>
<tr>
<th>Begin</th>
<th>End</th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan="2">Monday</td>
<td rowspan="2">8:00 a.m</td>
<td rowspan="2">5:00 p.m</td>
<td>Introduction to XML</td>
</tr>
<tr>
<td>Validity: DTD and Relax NG</td>
</tr>
<tr>
<td rowspan="4">Tuesday</td>
<td>8:00 a.m</td>
<td>11:00 a.m</td>
<td rowspan="2">XPath</td>
</tr>
<tr>
<td rowspan="2">11:00 a.m</td>
<td rowspan="2">2:00 p.m</td>
</tr>
<tr>
<td rowspan="2">XSL transformation</td>
</tr>
<tr>
<td>2:00 p.m</td>
<td>5:00 p.m</td>
</tr>
<tr>
<td>Wednesday</td>
<td>8:00 a.m</td>
<td>12:00 p.m</td>
<td>XLS Formatting Objects</td>
</tr>
</tbody>
</table>
</body>
</html>
Solution 2:
a little hacky but you could say that 11:00 am - 2:00 pm is actually two rows, not one (each cell would then be a rowspan=2
). Then Xpath and XSL transformation cells would also be rowspan=2
as there are 4 rows now. (Tuesday would be rowspan=4
)
Post a Comment for "Html Table - Complex Layout - Specificel"