Forum Moderators: not2easy
Example:
[] [] []
[] [] []
[] [] []
However, when testing it out, whenever I "open" and "closed" the tables repeatedly (using DHTML to switch the display property to hide and display the content of the tables). They began to align into a single column, and basically wrap at the end of the first table.
Example:
[]
[]
[]
[]
[]
[]
[]
My best guess is that because I'm changing the display property of the elements dynamically, it's causing problems with the way the elements are floating/flowing.
If you've seen this before or can provide some help, it would be duely appreciatedly.
a b c
When you then hide b using display:none (I assume) it takes b out of the page entirely...remember that display:none doesn't save a place in the flow for an element the way visibility:none; does. Furthermore, w3 specs say it removes the float property from b, as well. Here's a quote:
If 'display' has the value 'none', then 'position' and 'float' do not apply. In this case, the element generates no box.
Bear in mind I'm only theorizing here, and could be way off base, but here's a few things you might try...
1)Substitute visibility for display. Since visibility:none still creates a box for the element in the flow, dynamically altering it's visibility doesn't cause it to wink completely out of existence.
or
2)Add lines to your script that force a reload or refresh whenever the display property is altered. This would re-render the page with the float's display properties in hand. I think as long as the browser knows up front what it's dealing with, it will handle it fine. It's coming in after the fact and changing things that messes it up.
Let me know if either of these work!