Nest table in table invisibly

B

bob_jeffcoat

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,
 
M

Martin Jay

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:

Does changing this:

<table border = 2;Width=100% style='border-collapse: collapse; border-
top: hidden;border-bottom:hidden;border-left:hidden;border-
right:hidden' >

to:

<table border = 2;Width=100% style='border-collapse: collapse; border:
none;' >

give you the effect you want?
 
B

bob_jeffcoat

Does changing this:

<table border = 2;Width=100% style='border-collapse: collapse; border-


to:

<table border = 2;Width=100% style='border-collapse: collapse; border:
none;' >

give you the effect you want?


Hi Martin,
thanks for the reply.

It nearly works, but you can still see it's a different table. I want
to be able to stick tables together and make it look as if it's one
table. Maybe it's jsut because IE is a bit kronky...

Thanks anyway,
 
H

Harlan Messinger

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' >

That semicolon after the first "2" isn't going to work.
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:

Do you think the "border=2" might be causing a border to appear? Just a
hunch.
 
D

dorayme

Harlan Messinger said:
That semicolon after the first "2" isn't going to work.

Do you think the "border=2" might be causing a border to appear? Just a
hunch.

In any case, op should put the border instruction into the css,
since he has gone to the trouble of having some inline css. Is it
clear to anyone why *exactly* op wants a table within a table?
 
B

bob_jeffcoat

In any case, op should put the border instruction into the css,
since he has gone to the trouble of having some inline css. Is it
clear to anyone why *exactly* op wants a table within a table?

RIGHT, I thought it was only a matter of time before I got this kind
of 'help'.
My program generates a number tables for reporting certain things,
these tables have varying number of columns and sometimes I prefer to
join then together as it looks nicer. I have tried screwing around
with the column span on the cells to make all the tables equal width
but it never looks very good. My program uses an embeded webbrowser
which seems to insist on being IE so I really need IE to do it.

Now then, removing the Border = 2 isn't great as it then removes the
border on the inside of the table. I want my nested table to look
like the containing table so I want it to have borders on the inside
between it's rows.

Tell me the answer
 
B

bob_jeffcoat

RIGHT, I thought it was only a matter of time before I got this kind
of 'help'.
My program generates a number tables for reporting certain things,
these tables have varying number of columns and sometimes I prefer to
join then together as it looks nicer. I have tried screwing around
with the column span on the cells to make all the tables equal width
but it never looks very good. My program uses an embeded webbrowser
which seems to insist on being IE so I really need IE to do it.

Now then, removing the Border = 2 isn't great as it then removes the
border on the inside of the table. I want my nested table to look
like the containing table so I want it to have borders on the inside
between it's rows.

Tell me the answer

Oh, and another thing. I'm happy to use a css but it seems somewhat
irrelevant as stupid IE can't draw it right anyway...
 
R

rf

On 26 Nov, 23:37, dorayme <[email protected]> wrote:
RIGHT, I thought it was only a matter of time before I got this kind
of 'help'.

Without any idea of exactly what you want it is hard to guess what you need.

Perhaps a drawing of what you want might help. Do it manually with a pencil
and a peice of paper, scan it and post it on a web site somewhere.

That notwithstanding:

Ignore the border attribute, use CSS entirely.

Go over to the specs at
http://www.w3.org/TR/CSS21/tables.html#propdef-border-spacing and have a
read.

You will see you have three properties to play with: border, padding and
border-spacing. Only those three. Juggle them on the two tables as best you
can. There is quite a good diagram of what goes where in the spec.

However if what you want is what I think you want then it can't be done, or
at least I could not do it in the five minutes I have allocated to you. One
can never remove the border-spacing around the group of cells in that inner
table. Here is my best effort:
http://barefile.com.au/t.html

Play with it at your leisure.
Tell me the answer

Would you like fries with that sir?
 
D

dorayme

"rf said:
dorayme said:

Ah, a redirect to file:/Users/tedkroiter/Sites/droovies/fries.html (at least
that's what Opera says[1]) - that'll be usefull :)

[1] IE 6 and 7 say 404. Safari says don't have permission. Firefox does
nothing at all. Interesting.

I trust you did not get my follow up before you sent the above, I
noticed the problem...
 
D

dorayme

"rf said:
dorayme said:
rf said:
http://tinyurl.com/27tbnt

Ah, a redirect to file:/Users/tedkroiter/Sites/droovies/fries.html (at
least
that's what Opera says[1]) - that'll be usefull :)
I trust you did not get my follow up before you sent the above,

Nope. Still haven't.

Settled for a prawn roll and a jam donut with cream instead. Yumm.

I sent the additional urls with choices before I sent a reply to
you. Just for you, here is yet another url, directly to the film:

http://members.optushome.com.au/droovies/films/fries.wmv

Or you can download the link via

http://members.optushome.com.au/droovies/fries.html

(That way we could have a little argument discussion about me the
reasonableness of putting a link in a heading. I have an essay
prepared trying to justify it and no, it has nothing to do
whatsoever with making it big...)

Prawn roll and jam and cream... How come you have not got a
cholesterol problem like the rest of us mugs?
 
H

Harlan Messinger

RIGHT, I thought it was only a matter of time before I got this kind
of 'help'.
My program generates a number tables for reporting certain things,
these tables have varying number of columns and sometimes I prefer to
join then together as it looks nicer. I have tried screwing around
with the column span on the cells to make all the tables equal width
but it never looks very good. My program uses an embeded webbrowser
which seems to insist on being IE so I really need IE to do it.

Now then, removing the Border = 2 isn't great as it then removes the
border on the inside of the table. I want my nested table to look
like the containing table so I want it to have borders on the inside
between it's rows.

Tell me the answer

For your information, I had written an answer above but, once I saw
these last four words, and took into additional consideration your sneer
at dorayme's 'help' above, I deleted it. Who do you think you are?
 
H

Harlan Messinger

Oh, and another thing. I'm happy to use a css but it seems somewhat
irrelevant as stupid IE can't draw it right anyway...

That's funny. I've been using CSS with IE for years.
 
E

Ed Mullen

Oh, and another thing. I'm happy to use a css but it seems somewhat
irrelevant as stupid IE can't draw it right anyway...

Huh? No thing is perfect and IE is a good example. Still, it does not
get /everything/ wrong. And there are perfectly acceptable methods to
account for the differences. So, if I understand your comment, you've
abandoned using CSS because you either don't understand how to deal with
CSS and IE or you're just not willing to make the effort?

Seems a tad short-sighted to me. But, hey, whatever knocks your socks off.

--
Ed Mullen
http://edmullen.net
http://mozilla.edmullen.net
http://abington.edmullen.net
Erotic is using a feather. Kinky is using the whole chicken.
 
H

Herbert Blenner

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,997
Messages
2,570,240
Members
46,828
Latest member
LauraCastr

Latest Threads

Top