Firefox / IE Alignment Issue
- HollyHunter
- Newbie


- Joined: Jun 02, 2009
- Posts: 13
- Status: Offline
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:
And this is the associated CSS:
And the problem in image form:

Any ideas much appreciated.
Thanks
Holly x
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:
Code: [ Select ]
<!-- IF loggedin -->
<br>
<table width="900" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="20" bgcolor="#CCCCCC">
<div id="usernav_wrap">
<div id="usernav">
<ul>
<li class="first">{anchor:url1="account/home/",url2="index.php?m=account_home",name="core|usermenu_profile"}</li>
<!-- IF settings.enable_messaging -->
<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>
<!-- ENDIF -->
<!-- IF settings.enable_guestbooks -->
<!-- IF session.new_guestbooks > "0" -->
<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>
<!-- ELSE -->
<li>{anchor:url1="account/guestbook/",url2="index.php?m=account_guestbook",name="core|usermenu_guestbook"}</li>
<!-- ENDIF -->
<!-- ENDIF -->
<!-- IF settings.enable_blogs -->
<li>{anchor:url1="account/blog/",url2="index.php?m=account_blog",name="core|usermenu_blog"}</li>
<!-- ENDIF -->
<!-- IF settings.enable_pictures -->
<li>{anchor:url1="account/albums/",url2="index.php?m=account_albums",name="core|usermenu_pictures"}</li>
<!-- ENDIF -->
<!-- IF settings.enable_videos -->
<li>{anchor:url1="account/videos/",url2="index.php?m=account_videos",name="core|usermenu_videos"}</li>
<!-- ENDIF -->
<!-- IF settings.enable_audio -->
<li>{anchor:url1="account/audio/",url2="index.php?m=account_audio",name="core|usermenu_audio"}</li>
<!-- ENDIF -->
<!-- IF settings.enable_events -->
<li>{anchor:url1="account/events/",url2="index.php?m=account_events",name="core|usermenu_events"}</li>
<!-- ENDIF -->
<!-- IF settings.enable_friends -->
<!-- IF session.new_friends > "0" -->
<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>
<!-- ELSE -->
<li>{anchor:url1="account/friends/",url2="index.php?m=account_friends",name="core|usermenu_friends"}</li>
<!-- ENDIF -->
<!-- ENDIF -->
<!-- IF settings.enable_favorites -->
<li>{anchor:url1="account/favorites/",url2="index.php?m=account_favorites",name="core|usermenu_favorites"}</li>
<!-- ENDIF -->
<li>{anchor:url1="account/settings/",url2="index.php?m=account_settings",name="core|usermenu_settings"}</li>
<li>{anchor:url1="account/logout/",url2="index.php?m=account_logout",name="core|usermenu_logout"}</li>
</ul>
</div>
</div>
</tr>
</table>
</div>
<!-- ENDIF -->
<br>
<table width="900" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="20" bgcolor="#CCCCCC">
<div id="usernav_wrap">
<div id="usernav">
<ul>
<li class="first">{anchor:url1="account/home/",url2="index.php?m=account_home",name="core|usermenu_profile"}</li>
<!-- IF settings.enable_messaging -->
<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>
<!-- ENDIF -->
<!-- IF settings.enable_guestbooks -->
<!-- IF session.new_guestbooks > "0" -->
<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>
<!-- ELSE -->
<li>{anchor:url1="account/guestbook/",url2="index.php?m=account_guestbook",name="core|usermenu_guestbook"}</li>
<!-- ENDIF -->
<!-- ENDIF -->
<!-- IF settings.enable_blogs -->
<li>{anchor:url1="account/blog/",url2="index.php?m=account_blog",name="core|usermenu_blog"}</li>
<!-- ENDIF -->
<!-- IF settings.enable_pictures -->
<li>{anchor:url1="account/albums/",url2="index.php?m=account_albums",name="core|usermenu_pictures"}</li>
<!-- ENDIF -->
<!-- IF settings.enable_videos -->
<li>{anchor:url1="account/videos/",url2="index.php?m=account_videos",name="core|usermenu_videos"}</li>
<!-- ENDIF -->
<!-- IF settings.enable_audio -->
<li>{anchor:url1="account/audio/",url2="index.php?m=account_audio",name="core|usermenu_audio"}</li>
<!-- ENDIF -->
<!-- IF settings.enable_events -->
<li>{anchor:url1="account/events/",url2="index.php?m=account_events",name="core|usermenu_events"}</li>
<!-- ENDIF -->
<!-- IF settings.enable_friends -->
<!-- IF session.new_friends > "0" -->
<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>
<!-- ELSE -->
<li>{anchor:url1="account/friends/",url2="index.php?m=account_friends",name="core|usermenu_friends"}</li>
<!-- ENDIF -->
<!-- ENDIF -->
<!-- IF settings.enable_favorites -->
<li>{anchor:url1="account/favorites/",url2="index.php?m=account_favorites",name="core|usermenu_favorites"}</li>
<!-- ENDIF -->
<li>{anchor:url1="account/settings/",url2="index.php?m=account_settings",name="core|usermenu_settings"}</li>
<li>{anchor:url1="account/logout/",url2="index.php?m=account_logout",name="core|usermenu_logout"}</li>
</ul>
</div>
</div>
</tr>
</table>
</div>
<!-- ENDIF -->
- <!-- IF loggedin -->
- <br>
- <table width="900" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td height="20" bgcolor="#CCCCCC">
- <div id="usernav_wrap">
- <div id="usernav">
- <ul>
- <li class="first">{anchor:url1="account/home/",url2="index.php?m=account_home",name="core|usermenu_profile"}</li>
- <!-- IF settings.enable_messaging -->
- <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>
- <!-- ENDIF -->
- <!-- IF settings.enable_guestbooks -->
- <!-- IF session.new_guestbooks > "0" -->
- <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>
- <!-- ELSE -->
- <li>{anchor:url1="account/guestbook/",url2="index.php?m=account_guestbook",name="core|usermenu_guestbook"}</li>
- <!-- ENDIF -->
- <!-- ENDIF -->
- <!-- IF settings.enable_blogs -->
- <li>{anchor:url1="account/blog/",url2="index.php?m=account_blog",name="core|usermenu_blog"}</li>
- <!-- ENDIF -->
- <!-- IF settings.enable_pictures -->
- <li>{anchor:url1="account/albums/",url2="index.php?m=account_albums",name="core|usermenu_pictures"}</li>
- <!-- ENDIF -->
- <!-- IF settings.enable_videos -->
- <li>{anchor:url1="account/videos/",url2="index.php?m=account_videos",name="core|usermenu_videos"}</li>
- <!-- ENDIF -->
- <!-- IF settings.enable_audio -->
- <li>{anchor:url1="account/audio/",url2="index.php?m=account_audio",name="core|usermenu_audio"}</li>
- <!-- ENDIF -->
- <!-- IF settings.enable_events -->
- <li>{anchor:url1="account/events/",url2="index.php?m=account_events",name="core|usermenu_events"}</li>
- <!-- ENDIF -->
- <!-- IF settings.enable_friends -->
- <!-- IF session.new_friends > "0" -->
- <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>
- <!-- ELSE -->
- <li>{anchor:url1="account/friends/",url2="index.php?m=account_friends",name="core|usermenu_friends"}</li>
- <!-- ENDIF -->
- <!-- ENDIF -->
- <!-- IF settings.enable_favorites -->
- <li>{anchor:url1="account/favorites/",url2="index.php?m=account_favorites",name="core|usermenu_favorites"}</li>
- <!-- ENDIF -->
- <li>{anchor:url1="account/settings/",url2="index.php?m=account_settings",name="core|usermenu_settings"}</li>
- <li>{anchor:url1="account/logout/",url2="index.php?m=account_logout",name="core|usermenu_logout"}</li>
- </ul>
- </div>
- </div>
- </tr>
- </table>
- </div>
- <!-- ENDIF -->
And this is the associated CSS:
Code: [ Select ]
/* ********** [ USER NAVIGATION ] ********** */
div#usernav_wrap {
height: 20px;
background: ##CCCCCC }
div#usernav {
margin: 0px auto;
width: 900px; }
div#usernav ul {
list-style: none; }
div#usernav li {
padding: 0px 0px;
background: url("usermenu_div.gif") no-repeat;
float: left; }
div#usernav li.first {
padding: 0px 0px 0px 10px;
background: none; }
div#usernav ul li a {
padding: 6px 10px 0px 18px;
height: 20px;
display: block;
float: left;
font: 10px Verdana, Arial, Helvetica, sans-serif;
color: #666666;
text-decoration: none; }
div#usernav ul li a:hover {
text-decoration: underline; }
div#usernav_wrap {
height: 20px;
background: ##CCCCCC }
div#usernav {
margin: 0px auto;
width: 900px; }
div#usernav ul {
list-style: none; }
div#usernav li {
padding: 0px 0px;
background: url("usermenu_div.gif") no-repeat;
float: left; }
div#usernav li.first {
padding: 0px 0px 0px 10px;
background: none; }
div#usernav ul li a {
padding: 6px 10px 0px 18px;
height: 20px;
display: block;
float: left;
font: 10px Verdana, Arial, Helvetica, sans-serif;
color: #666666;
text-decoration: none; }
div#usernav ul li a:hover {
text-decoration: underline; }
- /* ********** [ USER NAVIGATION ] ********** */
- div#usernav_wrap {
- height: 20px;
- background: ##CCCCCC }
- div#usernav {
- margin: 0px auto;
- width: 900px; }
- div#usernav ul {
- list-style: none; }
- div#usernav li {
- padding: 0px 0px;
- background: url("usermenu_div.gif") no-repeat;
- float: left; }
- div#usernav li.first {
- padding: 0px 0px 0px 10px;
- background: none; }
- div#usernav ul li a {
- padding: 6px 10px 0px 18px;
- height: 20px;
- display: block;
- float: left;
- font: 10px Verdana, Arial, Helvetica, sans-serif;
- color: #666666;
- text-decoration: none; }
- div#usernav ul li a:hover {
- text-decoration: underline; }
And the problem in image form:

Any ideas much appreciated.
Thanks
Holly x
- Anonymous
- Bot


- Joined: 25 Feb 2008
- Posts: ?
- Loc: Ozzuland
- Status: Online
June 23rd, 2009, 3:35 am
- devilwood
- Silver Member


- Joined: Nov 18, 2007
- Posts: 429
- Status: Offline
Just try removing the unordered list tag.
You may have to add
display:inline;
to your li like this: I'm not sure why your links are showing up in a line.
div#usernav li {
padding: 0px 0px;
background: url("usermenu_div.gif") no-repeat;
float: left;
display:inline;
}
I'd first just remove the <ul></ul> .
You may have to add
display:inline;
to your li like this: I'm not sure why your links are showing up in a line.
Code: [ Select ]
div#usernav li {
padding: 0px 0px;
background: url("usermenu_div.gif") no-repeat;
float: left;
display:inline;
}
- div#usernav li {
- padding: 0px 0px;
- background: url("usermenu_div.gif") no-repeat;
- float: left;
- display:inline;
- }
I'd first just remove the <ul></ul> .
- HollyHunter
- Newbie


- Joined: Jun 02, 2009
- Posts: 13
- Status: Offline
- devilwood
- Silver Member


- Joined: Nov 18, 2007
- Posts: 429
- Status: Offline
I should be able to get this soon so here's try #2. I've had the same issue you're having, but I can't remember which project that I finally got it working on. Try the following as I think it's similar to the html structure you're looking for.
<div id="navigation">
<div align="center">
<li><a href="main.html" target="_self">Home</a></li>
<li><a href="about.html" target="_self">About</a></li>
<li><a href="properties.html" target="_self">Properties</a></li>
<li><a href="sprojects.html" target="_self">Special Projects</a></li>
<li><a href="videos.html" target="_self">Videos</a></li>
<li><a href="news.php" target="_self">News and Events</a></li>
<li><a href="testimonials.html" target="_self">Testimonials</a></li>
<li><a href="links.php" target="_self">Links</a></li>
</div>
</div>
#navigation {
background-color:#6d6d4a;
border-top: 1px #999967 solid;
border-bottom: 1px #999967 solid;
border-left: 2px #999967 solid;
border-right: 2px #999967 solid;
padding-left:0;
margin-left:0;
float: left;
left: 0px;
width: 99.5%;
height: 20px;
}
#navigation li {
top:0;
border:none;
position: relative;
padding:0;
display:inline;
margin-right: .75em;
}
#navigation li a{
font: 14px/18px Arial, Helvetica, sans-serif;
color: #48231A;
text-decoration: none;
}
#navigation li a:hover {
color: #000000;
}
Code: [ Select ]
<div id="navigation">
<div align="center">
<li><a href="main.html" target="_self">Home</a></li>
<li><a href="about.html" target="_self">About</a></li>
<li><a href="properties.html" target="_self">Properties</a></li>
<li><a href="sprojects.html" target="_self">Special Projects</a></li>
<li><a href="videos.html" target="_self">Videos</a></li>
<li><a href="news.php" target="_self">News and Events</a></li>
<li><a href="testimonials.html" target="_self">Testimonials</a></li>
<li><a href="links.php" target="_self">Links</a></li>
</div>
</div>
- <div id="navigation">
- <div align="center">
- <li><a href="main.html" target="_self">Home</a></li>
- <li><a href="about.html" target="_self">About</a></li>
- <li><a href="properties.html" target="_self">Properties</a></li>
- <li><a href="sprojects.html" target="_self">Special Projects</a></li>
- <li><a href="videos.html" target="_self">Videos</a></li>
- <li><a href="news.php" target="_self">News and Events</a></li>
- <li><a href="testimonials.html" target="_self">Testimonials</a></li>
- <li><a href="links.php" target="_self">Links</a></li>
- </div>
- </div>
Code: [ Select ]
#navigation {
background-color:#6d6d4a;
border-top: 1px #999967 solid;
border-bottom: 1px #999967 solid;
border-left: 2px #999967 solid;
border-right: 2px #999967 solid;
padding-left:0;
margin-left:0;
float: left;
left: 0px;
width: 99.5%;
height: 20px;
}
#navigation li {
top:0;
border:none;
position: relative;
padding:0;
display:inline;
margin-right: .75em;
}
#navigation li a{
font: 14px/18px Arial, Helvetica, sans-serif;
color: #48231A;
text-decoration: none;
}
#navigation li a:hover {
color: #000000;
}
- #navigation {
- background-color:#6d6d4a;
- border-top: 1px #999967 solid;
- border-bottom: 1px #999967 solid;
- border-left: 2px #999967 solid;
- border-right: 2px #999967 solid;
- padding-left:0;
- margin-left:0;
- float: left;
- left: 0px;
- width: 99.5%;
- height: 20px;
- }
- #navigation li {
- top:0;
- border:none;
- position: relative;
- padding:0;
- display:inline;
- margin-right: .75em;
- }
- #navigation li a{
- font: 14px/18px Arial, Helvetica, sans-serif;
- color: #48231A;
- text-decoration: none;
- }
- #navigation li a:hover {
- color: #000000;
- }
- Rabid Dog
- Web Master


- Joined: May 21, 2004
- Posts: 3229
- Loc: South Africa
- Status: Offline
set your div height and set your line height to the same value. then set your vertical align to middle
#usernav{
line-height: 30px;
height: 30px;
vertical-align: middle;
}
Code: [ Select ]
#usernav{
line-height: 30px;
height: 30px;
vertical-align: middle;
}
- #usernav{
- line-height: 30px;
- height: 30px;
- vertical-align: middle;
- }
Watch me grow
Page 1 of 1
To Reply to this topic you need to LOGIN or REGISTER. It is free.
Post Information
- Total Posts in this topic: 5 posts
- Users browsing this forum: this213 and 183 guests
- You cannot post new topics in this forum
- You cannot reply to topics in this forum
- You cannot edit your posts in this forum
- You cannot delete your posts in this forum
- You cannot post attachments in this forum
