You are here: Re: Nest table in table invisibly « HTML « IT news, forums, messages
Re: Nest table in table invisibly

Posted by Herbert Blenner on 11/28/07 06:53

On Nov 26, 2:58 pm, bob_jeffc...@hotmail.com wrote:
> Hello,
>
> I want to nest a table in another table in a way that makes it appear
> that there is only one table. This is because the program I have
> written joins tables together and it looks best if there appears to be
> only one table and it avoids the problems of column spanning. I can
> use this in the nested table in Firefox:
>
> <table border = 2;Width=100% style='border-collapse: collapse; border-
> top: hidden;border-bottom:hidden;border-left:hidden;border-
> right:hidden' >
>
> and it appears in the outer table just like some extra rows. But in
> IE 7 it doesn't work as it appears with a border around the nested
> table. It is driving me mad. Here is my entire HTML:
>
> <html><HEAD>
> <meta http-equiv="Content-Type" content="text/html; charset=unicode">
> </STYLE>
> </HEAD>
> <body >
> <div >
> <table border='1' style= 'border-collapse: collapse' caption="" >
> <tr >
> <th colspan='2' >Design Datum</th></tr>
> <tr ><td colspan='2'>
> <table border = 2;Width=100% style='border-collapse: collapse; border-
> top: hidden;border-bottom:hidden;border-left:hidden;border-
> right:hidden' >
> <tr ><th colspan='2'>Position</th></tr>
> <tr ><td >X Axis</td><td>(1, 0, 0)</td></tr>
> <tr ><td >Translation (mm)</td><td>(0, 0, 0)</td></tr></table>
> </tr></td>
> </table>
> </div>
> </body>
> </html>
>
> Can anyone help me?
>
> Thanks,

I have observed that IE 6.0 gives results that differ from Firefox
2.0, Netscape 9.0 and Opera 9.23. My efforts to tame IE 6 have failed.
So I decided to cheat by making the colors of the unwanted borders the
same as my white background. This fix produces the same appearance in
my four browsers.

<html>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=unicode">
<STYLE TYPE="text/css">
tr {border-collapse: collapse }
</STYLE>
</HEAD>
<body>
<div>
<table border='2'>
<tr>
<th style="border-color: white; border-style: solid">Design Datum</th>
</tr>
<tr>
<td style="border-color: white; border-style: solid">
<table Width=100%>
<tr >
<th colspan='2'>Position</th>
</tr>
<tr >
<td >X Axis</td>
<td>(1, 0, 0)</td>
</tr>
<tr >
<td>Translation (mm)</td>
<td>(0, 0, 0)</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>

Regards,

Herbert

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация