Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HTML Table + nested <tr>'s

Status
Not open for further replies.

googleman

Programmer
Aug 28, 2003
5
IE
Hi there was wondering if you could help me with this question-I have messed around with this table for over an hour now and I am totally frustrated that I cannot get the layout that I desire....

These are all the table headers that I need displayed ( all horizontally)

<table border=&quot;3&quot; align=&quot;left&quot; width=&quot;852&quot;>
<tr>
<th width=&quot;120&quot;><b>Major Business Process</b></td>
<th width=&quot;136&quot;><b>Overview of Business Process</b></td>
<th width=&quot;107&quot;><b>Significant Business Risks</b></td>
<th width=&quot;132&quot;><b>Risk Assessment</b><br>1 =Low 5=High<br><b> Likelihood Impact</td>
<th width=&quot;81&quot;><b>Control In Place</b></td>
<th width=&quot;127&quot;><b>Control In Place <br>or<br>Action Required to Mitigate Risk</b></td>
<th width=&quot;99&quot;><b>2002 Update <br><br><b>C,A,E,I or O</b></td>

However I need some of the TH to look like this


<table border =&quot;3&quot;>
<tr>
<td colspan =2>Risk Assessment<br><br>1=Low 5=High</td></tr>
<tr align= &quot;center&quot;>
<td>Likelihood</td>
<td>Impact</td>
</tr>
</table>


<table border =&quot;3&quot;>
<tr>
<td colspan =2>Control In Place</td></tr>
<tr align= &quot;center&quot;>
<td>Yes</td>
<td>No</td>
</tr>
</table>



<table border =&quot;3&quot;>
<tr>
<td colspan =2>2002 Update</td></tr>
<tr align= &quot;center&quot;>
<td> C, A , E, I or O</td>

</tr>
</table>

How do I nest these snipets of code within the above listed TH's while still keeping them all horizontal?So lost can you please help me?

Thank you so much :)

 
Here ya go...

<table border=&quot;3&quot; align=&quot;left&quot; width=&quot;852&quot;>
<tr>
<th width=&quot;120&quot;><b>Major Business Process</b></th>
<th width=&quot;136&quot;><b>Overview of Business Process</b></th>
<th width=&quot;107&quot;><b>Significant Business Risks</b></th>
<th width=&quot;132&quot;>
<table border =&quot;3&quot;>
<tr>
<td colspan =2>Risk Assessment<br><br>1=Low 5=High</td></tr>
<tr align= &quot;center&quot;>
<td>Likelihood</td>
<td>Impact</td>
</tr>
</table>
</th>
<th width=&quot;81&quot;>
<table border =&quot;3&quot;>
<tr>
<td colspan =2>Control In Place</td></tr>
<tr align= &quot;center&quot;>
<td>Yes</td>
<td>No</td>
</tr>
</table>
</th>
<th width=&quot;127&quot;><b>Control In Place <br>or<br>Action Required to Mitigate Risk</b></th>
<th width=&quot;99&quot;>
<table border =&quot;3&quot;>
<tr>
<td colspan =2>2002 Update</td></tr>
<tr align= &quot;center&quot;>
<td> C, A , E, I or O</td>
</tr>
</table>
</th>
<tr>
</table>

I think that you can make it look like you want from here on...

Good luck,
Rick

-----------------------------------------------------------
RISTMO Designs
Arab Church
Reference Guides
 
You've already discovered the [tt]colspan[/tt] attribute, you need to use the [tt]rowspan[/tt] one too. something like this:
[tt]
<table border=&quot;3&quot; align=&quot;left&quot; width=&quot;852&quot;>
<tr>
<th width=&quot;120&quot; rowspan=&quot;2&quot;><b>Major Business Process</b></th>
<th width=&quot;136&quot; rowspan=&quot;2&quot;><b>Overview of Business Process</b></th>
<th width=&quot;107&quot; rowspan=&quot;2&quot;><b>Significant Business Risks</b></th>
<th width=&quot;132&quot; colspan=&quot;2&quot;><b>Risk Assessment</b><br>1 =Low 5=High</th>
<th width=&quot;81&quot; colspan=&quot;2&quot;><b>Control In Place</b></th>
<th width=&quot;127&quot; rowspan=&quot;2&quot;><b>Control In Place <br>or<br>Action Required to Mitigate Risk</b></th>
<th width=&quot;99&quot;><b>2002 Update </b></th>
</tr>
<tr align=&quot;center&quot;>
<th>Likelihood</th>
<th>Impact</th>
<th>Yes</th>
<th>No</th>
<th>C, A , E, I or O</th>
</tr>
<!-- Data rows in here -->
</table>
[/tt]
You may also need to set some [tt]valign[/tt] attributes to get the vertical alignment how you want it.

-- Chris Hunt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top