I pulled my hair for an hour and I just canโt understand why it doesnโt work.
HTML:
<div id="mainmenu"> <div class="menu"> <ul> <li class="page_item page-item-6"><a href="http://localhost/mysite/blog/">Blog</a></li> <li class="page_item page-item-4 current_page_item"><a href="http://localhost/mysite/">Front Page</a></li> <li class="page_item page-item-2"><a href="http://localhost/mysite/sample-page/">Sample Page</a></li> </ul> </div> </div>
CSS
div#mainmenu { position: absolute; top: 40px; right: 0; font-size: 77%; } div#mainmenu div.menu ul, div#mainmenu div.menu ul li, div#mainmenu div.menu ul li a { height: 36px; } div#mainmenu div.menu ul { display: table; float: left; width: 700px; table-layout: fixed; position: relative; } div#mainmenu div.menu ul li { display: table-cell; padding: 0 10px; overflow: hidden; } div#mainmenu div.menu ul li a { width: auto; background: none; margin: 10px auto; }
source share