I am trying to fix a horrid nested table layout for a site. The page will have a variable number of elements that leverage Google charts. Instead of complex spaghetti code that tries to lay things out inside of table cells I want to use a horizontal UL so the content blocks will lay out cleanly regardless of the charts involved. The problem I am having is the Google charts components leverage tables. When a table element exists anywhere inside a LI the LI gets moved to the next line (assuming because table elements by default have a newline before and after).
I have tried the various display modes for the table with no luck. Is this a lost cause?
Example HTML code to illustrate the issue:
<html> <body> <style type='text/css'> #navlist li{ display:inline; list-style-type:none; } </style> <ul id='navlist'> <li>TEST</li> <li>TEST2</li> <li> <table style='border:1px solid black'><tr><td>TEST</td></tr></table> </li> <li>TEST3</li> <li> <table style='border:1px solid blue'><tr><td>TEST</td></tr></table> </li> <li> <table style='border:1px solid green'><tr><td>TEST</td></tr></table> </li> </ul> </body> </html>