Muiter Posted October 23, 2011 Share Posted October 23, 2011 I have written an new menu for my website. In Explorer and Chrome it looks nice but when I use an other browser like Avant the menu is not aligned right. How can I solve this? CSS: #topnav ul{margin-left: 140px;padding:0 5px;font-size:15px;color:#3366cc;overflow:hidden;list-style-type: none;}#topnav ul li a{float:left;padding:8px;text-align: left;font-family: Tahoma, Arial, Helvetica, sans-serif;font-size: 15px;text-decoration: none;color: #999;}#topnav ul li a:hover{color: #e30613;cursor: pointer;}#topnav ul .current a{color: #e30613;} Source: <div id="topnav"> <ul> <li <?php if($current == 'index') { echo 'class="current"'; } ?>><a href="index.php">Introductie</a></li> <li <?php if($current == 'watersnijden') { echo 'class="current"'; } ?>><a href="watersnijden.php">Watersnijden</a></li> <li <?php if($current == 'lasersnijden') { echo 'class="current"'; } ?>><a href="lasersnijden.php">Lasersnijden</a></li> <li <?php if($current == 'plasmasnijden') { echo 'class="current"'; } ?>><a href="plasmasnijden.php">Plasmasnijden</a></li> <li <?php if($current == 'autogeensnijden') { echo 'class="current"'; } ?>><a href="autogeensnijden.php">Autogeensnijden</a></li> <li <?php if($current == 'zetwerk') { echo 'class="current"'; } ?>><a href="zetwerk.php">Zetwerk</a></li> <li <?php if($current == 'voorraad') { echo 'class="current"'; } ?>><a href="voorraad.php">Voorraad</a></li> <li <?php if($current == 'contact') { echo 'class="current"'; } ?>><a href="contact.php">Contact</a></li> </ul></div> Menu Ok Menu not aligned Link to comment Share on other sites More sharing options...
Ingolme Posted October 23, 2011 Share Posted October 23, 2011 You should try applying the "float: left" to the <li> element instead of the <a> element, because the <li> element is the one that's a block. Link to comment Share on other sites More sharing options...
Muiter Posted October 23, 2011 Author Share Posted October 23, 2011 Duotone Fox Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.