I have a submenu in a table that I want to display horizontally. I realize that using an ordered list is a better choice, but this is an OOTB control built into Kentico and I cannot change the tags used for the menu, only the CSS. In Firefox and IE8, it rendereds horizontally. However, in IE7 is is rendering vertically. How can I make it horizontal? Below is the html and css. You can see the result at www.jvallecorsa.com. I've tried using both float:left and display:inline on the tr tag to make it horizontal with no luck. Any help is appreciated! <table class="subCMSMenu"> <tr> <td class="subNavItem"> <img src="/images/navigation/firstsubnavbar.aspx" alt="Brainstorms" style="border-width: 0px;" />Brainstorms </td> </tr> <tr> <td class="subNavItem"> <img src="/images/navigation/firstsubnavbar.aspx" alt="Portfolio" style="border-width: 0px;" />Portfolio </td> </tr> </table> .subCMSMenu { text-align:left; position:absolute; display:inline; } .subCMSMenu tr { text-align:left; margin:0px; padding:0px; display:inline; } .subNavItem { text-align:left; margin:0px; padding:0px; display:inline; } .subNavItem img { display:inline; }
Try this CSS .subCMSMenu tr { text-align:left; margin:0px; padding:0px; display:block; float:left; } .subNavItem { text-align:left; display:block; float:left; width:150px; } Code (markup):