I am trying to fix a copied table of nested tables for a site. The page will have a variable number of elements that use Google charts. Instead of complex spaghetti code that tries to lay out things inside the table cells, I want to use horizontal UL, so the content blocks will be laid out clean, regardless of the diagrams used. The problem I am having is using the charting component tables of Google. When a table element exists somewhere inside the LI, the LI moves to the next row (it is assumed that the table elements by default have a new row before and after).
I tried various display modes for a table with no luck. Is this a lost thing?
Sample HTML code to illustrate the problem:
<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>
html css html-table
Tim reynolds
source share