Why doesn"t FireFox expand or contract tables?

Why doesn"t FireFox expand or contract tables?

am 14.04.2008 21:16:04 von Andrew Bailey

Hi,

I thought this would be a simple problem to solve but 8 hours of Googling
and trying various suggestions hasn't yielded any working solutions so I'd
like to ask this group.

I have a table with two cells, within each of these cells there is a table
with a single cell. When the content of one inner cell expands it should
force the other table to expand.

It works fine in IE7 but fails in Firefox.

Here's a code snippet (see source of example url for a more complete
version)...











When this content is expanded...









This table should expand too.






Here is a link to a test example...

http://www.microbuild.com/microbuild/test/expanding_table.ht ml


THE QUESTION:

How can I make the blue table (see example url) expand and contract when the
content of the green table is expanded or contracted in Firefox?



Many thanks

Andy

Re: Why doesn"t FireFox expand or contract tables?

am 14.04.2008 21:29:26 von Harlan Messinger

Andrew Bailey wrote:
> Hi,
>
> I thought this would be a simple problem to solve but 8 hours of
> Googling and trying various suggestions hasn't yielded any working
> solutions so I'd like to ask this group.
>
> I have a table with two cells, within each of these cells there is a
> table with a single cell. When the content of one inner cell expands it
> should force the other table to expand.
>
> It works fine in IE7 but fails in Firefox.

Have you tried using CSS instead of the long-since outmoded practice of
using height and width attributes in HTML to control the dimensions of
elements?

Re: Why doesn"t FireFox expand or contract tables?

am 14.04.2008 21:38:35 von Jeremy J Starcher

On Mon, 14 Apr 2008 19:16:04 +0000, Andrew Bailey wrote:

> Hi,
>
> I thought this would be a simple problem to solve but 8 hours of
> Googling and trying various suggestions hasn't yielded any working
> solutions so I'd like to ask this group.
>
> I have a table with two cells, within each of these cells there is a
> table with a single cell. When the content of one inner cell expands it
> should force the other table to expand.
>
> It works fine in IE7 but fails in Firefox.

[table snipped]


> THE QUESTION:
>
> How can I make the blue table (see example url) expand and contract when
> the content of the green table is expanded or contracted in Firefox?


GranParadiso/3.0a8 (Firefox 3.0 beta) works like you desire.

A few moments in Fx 2.5 didn't yield any quick fixes.


That said, nesting tables is rarely (if ever) a good idea. If you are
trying to do this for layout purposes, nested DIVS will give you a much
better layout that is also more accessible.

Re: Why doesn"t FireFox expand or contract tables?

am 14.04.2008 21:45:34 von Els

Andrew Bailey wrote:

>



> http://www.microbuild.com/microbuild/test/expanding_table.ht ml

> How can I make the blue table (see example url) expand and contract when the
> content of the green table is expanded or contracted in Firefox?

Not tested, but I think if you take the 260 height off both the other
tables, your problem will be non-existent. The 100% height on the
table with the blue border is 100% of the height that is *set* on the
parent, which is 260px. Do you for any reason need the 260px height?


--
Els http://locusmeus.com/

Re: Why doesn"t FireFox expand or contract tables?

am 14.04.2008 21:55:29 von Andrew Bailey

"Harlan Messinger" wrote in message
news:66hpkpF2kbvfkU1@mid.individual.net...
> Andrew Bailey wrote:
>> Hi,
>>
>> I thought this would be a simple problem to solve but 8 hours of Googling
>> and trying various suggestions hasn't yielded any working solutions so
>> I'd like to ask this group.
>>
>> I have a table with two cells, within each of these cells there is a
>> table with a single cell. When the content of one inner cell expands it
>> should force the other table to expand.
>>
>> It works fine in IE7 but fails in Firefox.
>
> Have you tried using CSS instead of the long-since outmoded practice of
> using height and width attributes in HTML to control the dimensions of
> elements?

Hi Harlan,

I've added an identical example table to the url using css, but as you can
see it behaves exactly the same as the original. I think it's one of those
things where Firefox is probably obeying some standard to the letter even
though it's dumb.

Thanks for looking

Andy

Re: Why doesn"t FireFox expand or contract tables?

am 14.04.2008 22:02:59 von Andrew Bailey

"Els" wrote in message
news:1vrmo8iytc41z.59vqpdqu1bp0$.dlg@40tude.net...
> Andrew Bailey wrote:
>
>>


>
>> http://www.microbuild.com/microbuild/test/expanding_table.ht ml
>
>> How can I make the blue table (see example url) expand and contract when
>> the
>> content of the green table is expanded or contracted in Firefox?
>
> Not tested, but I think if you take the 260 height off both the other
> tables, your problem will be non-existent. The 100% height on the
> table with the blue border is 100% of the height that is *set* on the
> parent, which is 260px. Do you for any reason need the 260px height?
>
>
> --
> Els http://locusmeus.com/

Hi Els,

I need the table to initially render to a height of 260, so yes that bit is
deliberate.

What I should then be able to do is specify 100% from that point on as 100%
would equal 100% of 260 but once again I'm thwarted by Firefox (works fine
in IE of course) as the green table will expand as expected (even though the
blue won't) but then stays expanded and doesn't shrink.

Thanks for looking


Andy

Re: Why doesn"t FireFox expand or contract tables?

am 14.04.2008 22:03:47 von Ben C

On 2008-04-14, Andrew Bailey wrote:
> Hi,
>
> I thought this would be a simple problem to solve but 8 hours of Googling
> and trying various suggestions hasn't yielded any working solutions so I'd
> like to ask this group.
>
> I have a table with two cells, within each of these cells there is a table
> with a single cell. When the content of one inner cell expands it should
> force the other table to expand.
>
> It works fine in IE7 but fails in Firefox.
>
> Here's a code snippet (see source of example url for a more complete
> version)...
[...]
> Here is a link to a test example...
>
> http://www.microbuild.com/microbuild/test/expanding_table.ht ml
>
>
> THE QUESTION:
>
> How can I make the blue table (see example url) expand and contract when the
> content of the green table is expanded or contracted in Firefox?

You're asking for 100% height of an auto-height container. Firefox is
well within the CSS spec to ignore the 100% and give you auto instead.

Re: Why doesn"t FireFox expand or contract tables?

am 14.04.2008 22:08:55 von Andrew Bailey

"Ben C" wrote in message
news:slrng07e5c.qa.spamspam@bowser.marioworld...



> You're asking for 100% height of an auto-height container.

YEP... that's exactly what I want.


> Firefox is well within the CSS spec to ignore the 100% and give you auto
> instead.

Seems like Firefox is too correct for it's own good if you ask me ;)


So then, how do I achieve what should be very simple behavior in Firefox?



Thanks for looking


Andy

Re: Why doesn"t FireFox expand or contract tables?

am 14.04.2008 22:37:39 von Ben C

On 2008-04-14, Andrew Bailey wrote:
>
> "Ben C" wrote in message
> news:slrng07e5c.qa.spamspam@bowser.marioworld...
>
>
>
>> You're asking for 100% height of an auto-height container.
>
> YEP... that's exactly what I want.
>
>
>> Firefox is well within the CSS spec to ignore the 100% and give you auto
>> instead.
>
> Seems like Firefox is too correct for it's own good if you ask me ;)
>
>
> So then, how do I achieve what should be very simple behavior in Firefox?

Well the only semi-pukka way to do that within the letter and spirit of
the CSS specification is to make the container position: relative and
then use position: absolute on the thing inside it with top: 0 and
bottom: 0.

But as discussed recently here or in a similar NG that doesn't work in
Firefox either. This is technically sort of OK since the spec does say
position: relative on table-cells is undefined (although it doesn't
mention any exception for table-cells in the definitions of containing
block).

WORK-AROUND FOUND

am 14.04.2008 23:01:02 von Andrew Bailey

"Andrew Bailey" wrote in message
news:U3OMj.239$DQ3.145@newsfe1-win.ntli.net...
> Hi,
>
> I thought this would be a simple problem to solve but 8 hours of Googling
> and trying various suggestions hasn't yielded any working solutions so I'd
> like to ask this group.
>
> I have a table with two cells, within each of these cells there is a table
> with a single cell. When the content of one inner cell expands it should
> force the other table to expand.
>
> It works fine in IE7 but fails in Firefox.
>
> Here's a code snippet (see source of example url for a more complete
> version)...
>
>
>


>
>
>

>
>
>
>

>
> When this content is expanded...
>
>

>
>

>
>
>
>

>
> This table should expand too.
>
>

>
>

>
>
> Here is a link to a test example...
>
> http://www.microbuild.com/microbuild/test/expanding_table.ht ml
>
>
> THE QUESTION:
>
> How can I make the blue table (see example url) expand and contract when
> the content of the green table is expanded or contracted in Firefox?
>
>
>
> Many thanks
>
> Andy
>
>
>
>

Hi all,

It would seem that the solution is to switch the entire table (or rather
further up the mark-up tree). I have appended a third working example to the
test url.

Thanks for feedback and comments.

Andy

Re: Why doesn"t FireFox expand or contract tables?

am 15.04.2008 15:36:06 von Bergamot

Andrew Bailey wrote:
>
> I have a table with two cells, within each of these cells there is a table
> with a single cell. When the content of one inner cell expands it should
> force the other table to expand.
>
> It works fine in IE7 but fails in Firefox.
>
> http://www.microbuild.com/microbuild/test/expanding_table.ht ml

Why do you need a nested table in that second cell? What happens if you
get rid of that nested table and put the blue borders around that td
instead?

BTW, you should clean up that code. You have an invalid