Firefox / IE Alignment Issue

Discussion in 'HTML & Website Design' started by TLSC, Jun 23, 2009.

  1. #1
    Hello All

    I have an issue where the links in my navigation menu are aligning correctly in Firefox (in the middle vertically) but in Internet Explorer they are aligning at the bottom and I can't work out why as my CSS knowledge isn't great - hoping somebody can help me a little bit.

    This is the code for the navigation menu in the template:

     1.  <!-- IF loggedin -->
       2.   <br>   
       3.   <table width="900" border="0" cellspacing="0" cellpadding="0">
       4.     <tr>
       5.       <td height="20" bgcolor="#CCCCCC">
       6.  
       7.             <div id="usernav_wrap">
       8.                 <div id="usernav">
       9.                     <ul>
      10.                         <li class="first">{anchor:url1="account/home/",url2="index.php?m=account_home",name="core|usermenu_profile"}</li>
      11.                         <!-- IF settings.enable_messaging -->
      12.                             <li><a href="{virtual_path}{ifelse:settings.fancy_urls,"1","account/messages/","index.php?m=account_messages"}" title="{lang:"core","usermenu_messages"}">{lang:"core","usermenu_messages"}<!-- IF session.new_messages > "0" --> ({session.new_messages})<!-- ENDIF --></a></li>
      13.                         <!-- ENDIF -->
      14.                         <!-- IF settings.enable_guestbooks -->
      15.                             <!-- IF session.new_guestbooks > "0" -->
      16.                                 <li><a href="{virtual_path}{ifelse:settings.fancy_urls,"1","account/guestbook/unapproved/","index.php?m=account_guestbook&p=unapproved"}" title="{lang:"core","usermenu_guestbook"}">{lang:"core","usermenu_guestbook"} ({session.new_guestbooks})</a></li>
      17.                             <!-- ELSE -->
      18.                                 <li>{anchor:url1="account/guestbook/",url2="index.php?m=account_guestbook",name="core|usermenu_guestbook"}</li>
      19.                             <!-- ENDIF -->
      20.                         <!-- ENDIF -->
      21.                         <!-- IF settings.enable_blogs -->
      22.                             <li>{anchor:url1="account/blog/",url2="index.php?m=account_blog",name="core|usermenu_blog"}</li>
      23.                         <!-- ENDIF -->
      24.                         <!-- IF settings.enable_pictures -->
      25.                             <li>{anchor:url1="account/albums/",url2="index.php?m=account_albums",name="core|usermenu_pictures"}</li>
      26.                         <!-- ENDIF -->
      27.                         <!-- IF settings.enable_videos -->
      28.                             <li>{anchor:url1="account/videos/",url2="index.php?m=account_videos",name="core|usermenu_videos"}</li>
      29.                         <!-- ENDIF -->
      30.                         <!-- IF settings.enable_audio -->
      31.                             <li>{anchor:url1="account/audio/",url2="index.php?m=account_audio",name="core|usermenu_audio"}</li>
      32.                         <!-- ENDIF -->
      33.                         <!-- IF settings.enable_events -->
      34.                             <li>{anchor:url1="account/events/",url2="index.php?m=account_events",name="core|usermenu_events"}</li>
      35.                         <!-- ENDIF -->
      36.                         <!-- IF settings.enable_friends -->
      37.                             <!-- IF session.new_friends > "0" -->
      38.                                 <li><a href="{virtual_path}{ifelse:settings.fancy_urls,"1","account/friends/requests/","index.php?m=account_friends&p=requests"}" title="{lang:"core","usermenu_friends"}">{lang:"core","usermenu_friends"} ({session.new_friends})</a></li>
      39.                             <!-- ELSE -->
      40.                                 <li>{anchor:url1="account/friends/",url2="index.php?m=account_friends",name="core|usermenu_friends"}</li>
      41.                             <!-- ENDIF -->
      42.                         <!-- ENDIF -->
      43.                         <!-- IF settings.enable_favorites -->
      44.                             <li>{anchor:url1="account/favorites/",url2="index.php?m=account_favorites",name="core|usermenu_favorites"}</li>
      45.                         <!-- ENDIF -->
      46.                         <li>{anchor:url1="account/settings/",url2="index.php?m=account_settings",name="core|usermenu_settings"}</li>
      47.                         <li>{anchor:url1="account/logout/",url2="index.php?m=account_logout",name="core|usermenu_logout"}</li>
      48.                     </ul>
      49.                 </div>
      50.             </div>
      51.     </tr>
      52.   </table>
      53. </div>
      54. <!-- ENDIF -->
    Code (markup):
    And this is the associated CSS:

       1. /* ********** [ USER NAVIGATION ] ********** */
       2.  
       3. div#usernav_wrap {
       4.     height: 20px;
       5.     background: ##CCCCCC }
       6.  
       7.     div#usernav {
       8.         margin: 0px auto;
       9.         width: 900px; }
      10.  
      11.         div#usernav ul {
      12.             list-style: none; }
      13.  
      14.             div#usernav li {
      15.                 padding: 0px 0px;
      16.                 background: url("usermenu_div.gif") no-repeat;
      17.                 float: left; }
      18.  
      19.             div#usernav li.first {
      20.                 padding: 0px 0px 0px 10px;
      21.                 background: none; }
      22.  
      23.                 div#usernav ul li a {
      24.                     padding: 6px 10px 0px 18px;
      25.                     height: 20px;
      26.                     display: block;
      27.                     float: left;
      28.                     font: 10px Verdana, Arial, Helvetica, sans-serif;
      29.                     color: #666666;
      30.                     text-decoration: none; }
      31.  
      32.                     div#usernav ul li a:hover {
      33.                         text-decoration: underline; }
    Code (markup):

    And the problem in image form:

    [​IMG]

    Any ideas much appreciated.

    Cheers

    Paul
     
    TLSC, Jun 23, 2009 IP