
11-08-2013, 07:13 AM
|
Regular
|
|
Join Date: Aug 2004
Location: St Louis
Posts: 72
|
|
I haven't found a way to get the look I want without nested tables. My environment is Visual Web Developer. I actually have a table that contains several FormView controls. Some of the FormView controls contain tables that have 1 level of nested tables.
To see an example, put this in an html file. (these examples don't use styles but they illustrate what I'm trying to d.o)
Code:
<table border=1>
<tr>
<td width=40px>
xxx
</td>
<td>
<table>
<tr>
<td>22</td>
<td>°F</td>
</tr>
<tr>
<td>33</td>
<td>°F</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
yyy
</td>
<td>
<table>
<tr>
<td>44</td>
<td>°F</td>
</tr>
<tr>
<td>55</td>
<td>°F</td>
</tr>
</table>
</td>
</tr>
</table>
<br />
<br />
<table border=1>
<tr>
<td width=40px rowspan="2">
xxx
</td>
<td>22</td>
<td>°F</td>
</tr>
<tr>
<td>33</td>
<td>°F</td>
</tr>
<tr>
<td rowspan="2">
yyy
</td>
<td>44</td>
<td>°F</td>
</tr>
<tr>
<td>55</td>
<td>°F</td>
</tr>
</table>
The first table is what I want. For each row there is a cell on the left that spans multiple rows to the right. The cell on the right contains 2-3 rows with 2 columns. I want borders round the the cell on the left and the group of cells on the right but not around the individual cells on the right. Defining global styles for td, th, etc will show borders on every cell whether I used nested tables or not. It seemed that if I specify a style for the outer table the same style would be applied to the nested table as well.
At this point I have things working the way I want. I just thought there might be an easier way to use styles. Thanks for the advice!
|
|