View Full Version : Firefox and conditional JS table style.display = 'inline'

05-03-2007, 05:47 PM
howdies again.

I started writing this... then found a solution (see the end.) I'm posting it anyway in case it affects other people. Maybe someone else can shed more light on it?

I have some payment form fields that display depending on selection of a payment type radio button. Here's the form:


The problem comes with some validation error display messages and Firefox.

The error messages do not flexibly affect the table cell where they appear, they wrap underneath the next cell. You get some ugly behavior when that happens. Works just fine and dandy in IE 7.

This problem *only* affects the tables that are displayed using Javascript, and are hidden otherwise, e.g.,


I also display some inline validation error messages at the top of the page, too, within tables, and those work fine.

If I add borders to the table, I can see that the cells in the payment tables are irregularly shrunk up to only fit their contents, only in Firefox is this a problem.

I have tried adding dimensionality to the tables, table body, and cells, both directly, and in styles, with no result.

When I remove the javascript for the conditional display, all looks good, so I suspect that it's something about displaying the table using JS.

SOLUTION: I added the style display:block to the table class.

Interesting? You know something about this behavior?