Ever since I made the XHTML/CSS switch, I, like many people, have been terrified at the idea of using tables. However, I’ve tried to keep a relatively open mind about using tables to display tabular data (it is what they were made for after all). Now I have a very good reason not to.
What happens when you try to move data around within a table? Nothing good. Other elements stay put, <tbody>, <tr>, and <td> tags are bound to get lost in the confusion, and chances are, you’re going to end up putting in a little too much work. So what can you do?
Use floats! While some may argue that using floated elements is as frustrating as using tables, and that argument does have some basis - floating an element takes it out of the normal document flow and can cause a whole bunch of headaches. However, if they are used appropriately and correctly, floated elements can take the place of your tabular data.
Because of their uncanny ability to move to the next available space, a group of floated divs can work much like a self-adjusting table. Isn’t that nice? So do yourself a favor: next time you have a group of data that needs to be re-arranged, try using floated div’s instead of tables.



