Evario
10-16-2007, 11:09 PM
Hi I have a quick question. I have a nav menu at http://www.techlimelight.com and it works fine in Firefox but not in IE. The menu in question is the top nav. The submenus do not line up correctly in IE.
Also two minor things that I am sure is easy to fix. First is I would like to have the entire cell be a link and not only the text. For instance if you hover over the "Home" cell the cell will light up but it does not become a link until you hover over the letters Home. Secondly is that the submenus don't line up perfectly to their parent cells. They are offset by a pixel or two to the right (In browsers that display it correctly like Firefox). Minor, I know, but it would look much better properly lined up.
Any help would be much appreciated.
Thanks,
Marc
TOP NAV HTML
<div class="topNavbar">
<div class="topNavHome" align="center">
<p><a class="topNavbar" href="{php}echo SITE_URL;{/php}">Home</a></p>
</div>
<div class="topNavLimelight" align="center">
<p><a class="topNavbar" href="{php}echo SITE_URL;{/php}limelight.php">Limelights</a></p>
<div id="topNav1" class="topNavNormal" align="left">
<div class="topNavListItem"><a class="topNavListItem" href="{php}echo SITE_URL;{/php}limelight.php">Limelight Home</a></div>
<div class="topNavListItem"><a class="topNavListItem" href="{php}echo SITE_URL;{/php}#">Browse</a></div>
<div class="topNavListItem"><a class="topNavListItem" href="{php}echo SITE_URL;{/php}#">Search</a></div>
<div class="topNavListItem"><a class="topNavListItem" href="{php}echo SITE_URL;{/php}limelight/actions/submit.html">Submit a Limelight</a></div>
<div class="topNavListItem"><a class="topNavListItem" href="{php}echo SITE_URL;{/php}#">What is a Limelight?</a></div>
</div>
</div>
<div class="topNavLimelight_Toggle" onClick="toggleTopNav('topNav1', '1');">
<img name="top_nav_limelight1" src="{php}echo SITE_URL;{/php}images/top_nav_plus_static.jpg"
onmouseover="flipImage('top_nav_limelight1', '{php}echo SITE_URL;{/php}images/top_nav_plus_hover.jpg')"
onmouseout="flipImage('top_nav_limelight1', '{php}echo SITE_URL;{/php}images/top_nav_plus_static.jpg')" />
</div>
<div class="topNavNewsContact" align="center">
<p><a class="topNavbar" href="#">News</a></p>
<div id="topNav2" class="topNavNormal" align="left">
<div class="topNavListItem"><a class="topNavListItem" href="{php}echo SITE_URL;{/php}#">News Home</a></div>
<div class="topNavListItem"><a class="topNavListItem" href="{php}echo SITE_URL;{/php}#">Browse</a></div>
<div class="topNavListItem"><a class="topNavListItem" href="{php}echo SITE_URL;{/php}#">Search</a></div>
<div class="topNavListItem"><a class="topNavListItem" href="{php}echo SITE_URL;{/php}#">Submit a Story</a></div>
<div class="topNavListItem"><a class="topNavListItem" href="{php}echo SITE_URL;{/php}#">How Does News Work?</a></div>
</div>
</div>
<div class="topNavLimelight_Toggle" onClick="toggleTopNav('topNav2', '2');">
<img name="top_nav_limelight2" src="{php}echo SITE_URL;{/php}images/top_nav_plus_static.jpg"
onmouseover="flipImage('top_nav_limelight2', '{php}echo SITE_URL;{/php}images/top_nav_plus_hover.jpg')"
onmouseout="flipImage('top_nav_limelight2', '{php}echo SITE_URL;{/php}images/top_nav_plus_static.jpg')" />
</div>
<div class="topNavNewsContact" align="center">
<p><a class="topNavbar" href="#">Information</a></p>
<div id="topNav3" class="topNavNormal" align="left">
<div class="topNavListItem"><a class="topNavListItem" href="{php}echo SITE_URL;{/php}#">About</a></div>
<div class="topNavListItem"><a class="topNavListItem" href="{php}echo SITE_URL;{/php}#">Privacy</a></div>
<div class="topNavListItem"><a class="topNavListItem" href="{php}echo SITE_URL;{/php}#">Help</a></div>
<div class="topNavListItem"><a class="topNavListItem" href="{php}echo SITE_URL;{/php}#">Contact</a></div>
</div>
</div>
<div class="topNavLimelight_Toggle" onClick="toggleTopNav('topNav3', '3');">
<img name="top_nav_limelight3" src="{php}echo SITE_URL;{/php}images/top_nav_plus_static.jpg"
onmouseover="flipImage('top_nav_limelight3', '{php}echo SITE_URL;{/php}images/top_nav_plus_hover.jpg')"
onmouseout="flipImage('top_nav_limelight3', '{php}echo SITE_URL;{/php}images/top_nav_plus_static.jpg')" />
</div>
</div>
TOP NAV JAVASCRIPT
// JavaScript Document
function toggleTopNav(id, number) {
var m = 3;
var t = document.getElementById(id);
var f = t.className == 'topNavNormal';
for ( i = 1; i <= m; i++ ) {
document.getElementById('topNav' + i).className = 'topNavNormal';
} // endfor i
if ( f ) {
t.className = 'topNavList' + number;
}
}
TOP NAV CSS
@charset "utf-8";
/* CSS Document */
P
{
padding: 9px;
margin: 0px;
}
a:hover {
cursor: pointer;
}
div.topNavbar
{
font-size: 16px;
margin: 0px;
padding: 0px;
border: 0px;
font-weight: bold;
width: 700px;
font-family: Calibri, "Times New Roman", Arial;
color: #666666;
}
div.topNavNormal
{
display: none;
position: static;
}
div.topNavHome
{
padding: 0px;
font-weight: bold;
vertical-align: top;
width: 115px;
height: 37px;
border-left: 1px #999999 solid;
border-bottom: 1px #999999 solid;
border-right: 1px #999999 solid;
margin-left: 20px;
float: left;
}
div.topNavHome:hover
{
background-color: #F0FBC8;
}
div.topNavLimelight
{
vertical-align: top;
width: 105px;
height: 37px;
border-left: 1px #999999 solid;
border-bottom: 1px #999999 solid;
border-right: 1px #999999 solid;
margin-left: 12px;
float: left;
}
div.topNavLimelight:hover
{
background-color: #F0FBC8;
}
div.topNavNewsContact
{
vertical-align: top;
width: 95px;
height: 37px;
border-left: 1px #999999 solid;
border-bottom: 1px #999999 solid;
border-right: 1px #999999 solid;
margin-left: 12px;
float: left;
}
div.topNavNewsContact:hover
{
background-color: #F0FBC8;
}
div.topNavLimelight_Toggle
{
width: 20px;
float: left;
}
div.topNavLimelight_Toggle:hover
{
background-color: #F0FBC8;
}
div.topNavList1
{
vertical-align: top;
background-color: #FFFFFF;
width: 125px;
height: 120px;
border: 1px solid #5F7709;
position: absolute;
z-index: 10;
padding-left: 8px;
}
div.topNavList2
{
vertical-align: top;
background-color: #FFFFFF;
width: 150px;
height: 120px;
border: 1px solid #5F7709;
position: absolute;
z-index: 10;
padding-left: 8px;
}
div.topNavList3
{
vertical-align: top;
background-color: #FFFFFF;
width: 125px;
height: 95px;
border: 1px solid #5F7709;
position: absolute;
z-index: 10;
padding-left: 8px;
}
div.topNavListItem
{
width: 155px;
margin-top: 5px;
margin-bottom: 5px;
font-size: 14px;
}
a.topNavListItem
{
color: #999999;
}
a.topNavListItem:hover
{
color: #666666;
}
a.topNavbar
{
font-size: 16px;
color: #666666;
font-weight: bold;
}
Also two minor things that I am sure is easy to fix. First is I would like to have the entire cell be a link and not only the text. For instance if you hover over the "Home" cell the cell will light up but it does not become a link until you hover over the letters Home. Secondly is that the submenus don't line up perfectly to their parent cells. They are offset by a pixel or two to the right (In browsers that display it correctly like Firefox). Minor, I know, but it would look much better properly lined up.
Any help would be much appreciated.
Thanks,
Marc
TOP NAV HTML
<div class="topNavbar">
<div class="topNavHome" align="center">
<p><a class="topNavbar" href="{php}echo SITE_URL;{/php}">Home</a></p>
</div>
<div class="topNavLimelight" align="center">
<p><a class="topNavbar" href="{php}echo SITE_URL;{/php}limelight.php">Limelights</a></p>
<div id="topNav1" class="topNavNormal" align="left">
<div class="topNavListItem"><a class="topNavListItem" href="{php}echo SITE_URL;{/php}limelight.php">Limelight Home</a></div>
<div class="topNavListItem"><a class="topNavListItem" href="{php}echo SITE_URL;{/php}#">Browse</a></div>
<div class="topNavListItem"><a class="topNavListItem" href="{php}echo SITE_URL;{/php}#">Search</a></div>
<div class="topNavListItem"><a class="topNavListItem" href="{php}echo SITE_URL;{/php}limelight/actions/submit.html">Submit a Limelight</a></div>
<div class="topNavListItem"><a class="topNavListItem" href="{php}echo SITE_URL;{/php}#">What is a Limelight?</a></div>
</div>
</div>
<div class="topNavLimelight_Toggle" onClick="toggleTopNav('topNav1', '1');">
<img name="top_nav_limelight1" src="{php}echo SITE_URL;{/php}images/top_nav_plus_static.jpg"
onmouseover="flipImage('top_nav_limelight1', '{php}echo SITE_URL;{/php}images/top_nav_plus_hover.jpg')"
onmouseout="flipImage('top_nav_limelight1', '{php}echo SITE_URL;{/php}images/top_nav_plus_static.jpg')" />
</div>
<div class="topNavNewsContact" align="center">
<p><a class="topNavbar" href="#">News</a></p>
<div id="topNav2" class="topNavNormal" align="left">
<div class="topNavListItem"><a class="topNavListItem" href="{php}echo SITE_URL;{/php}#">News Home</a></div>
<div class="topNavListItem"><a class="topNavListItem" href="{php}echo SITE_URL;{/php}#">Browse</a></div>
<div class="topNavListItem"><a class="topNavListItem" href="{php}echo SITE_URL;{/php}#">Search</a></div>
<div class="topNavListItem"><a class="topNavListItem" href="{php}echo SITE_URL;{/php}#">Submit a Story</a></div>
<div class="topNavListItem"><a class="topNavListItem" href="{php}echo SITE_URL;{/php}#">How Does News Work?</a></div>
</div>
</div>
<div class="topNavLimelight_Toggle" onClick="toggleTopNav('topNav2', '2');">
<img name="top_nav_limelight2" src="{php}echo SITE_URL;{/php}images/top_nav_plus_static.jpg"
onmouseover="flipImage('top_nav_limelight2', '{php}echo SITE_URL;{/php}images/top_nav_plus_hover.jpg')"
onmouseout="flipImage('top_nav_limelight2', '{php}echo SITE_URL;{/php}images/top_nav_plus_static.jpg')" />
</div>
<div class="topNavNewsContact" align="center">
<p><a class="topNavbar" href="#">Information</a></p>
<div id="topNav3" class="topNavNormal" align="left">
<div class="topNavListItem"><a class="topNavListItem" href="{php}echo SITE_URL;{/php}#">About</a></div>
<div class="topNavListItem"><a class="topNavListItem" href="{php}echo SITE_URL;{/php}#">Privacy</a></div>
<div class="topNavListItem"><a class="topNavListItem" href="{php}echo SITE_URL;{/php}#">Help</a></div>
<div class="topNavListItem"><a class="topNavListItem" href="{php}echo SITE_URL;{/php}#">Contact</a></div>
</div>
</div>
<div class="topNavLimelight_Toggle" onClick="toggleTopNav('topNav3', '3');">
<img name="top_nav_limelight3" src="{php}echo SITE_URL;{/php}images/top_nav_plus_static.jpg"
onmouseover="flipImage('top_nav_limelight3', '{php}echo SITE_URL;{/php}images/top_nav_plus_hover.jpg')"
onmouseout="flipImage('top_nav_limelight3', '{php}echo SITE_URL;{/php}images/top_nav_plus_static.jpg')" />
</div>
</div>
TOP NAV JAVASCRIPT
// JavaScript Document
function toggleTopNav(id, number) {
var m = 3;
var t = document.getElementById(id);
var f = t.className == 'topNavNormal';
for ( i = 1; i <= m; i++ ) {
document.getElementById('topNav' + i).className = 'topNavNormal';
} // endfor i
if ( f ) {
t.className = 'topNavList' + number;
}
}
TOP NAV CSS
@charset "utf-8";
/* CSS Document */
P
{
padding: 9px;
margin: 0px;
}
a:hover {
cursor: pointer;
}
div.topNavbar
{
font-size: 16px;
margin: 0px;
padding: 0px;
border: 0px;
font-weight: bold;
width: 700px;
font-family: Calibri, "Times New Roman", Arial;
color: #666666;
}
div.topNavNormal
{
display: none;
position: static;
}
div.topNavHome
{
padding: 0px;
font-weight: bold;
vertical-align: top;
width: 115px;
height: 37px;
border-left: 1px #999999 solid;
border-bottom: 1px #999999 solid;
border-right: 1px #999999 solid;
margin-left: 20px;
float: left;
}
div.topNavHome:hover
{
background-color: #F0FBC8;
}
div.topNavLimelight
{
vertical-align: top;
width: 105px;
height: 37px;
border-left: 1px #999999 solid;
border-bottom: 1px #999999 solid;
border-right: 1px #999999 solid;
margin-left: 12px;
float: left;
}
div.topNavLimelight:hover
{
background-color: #F0FBC8;
}
div.topNavNewsContact
{
vertical-align: top;
width: 95px;
height: 37px;
border-left: 1px #999999 solid;
border-bottom: 1px #999999 solid;
border-right: 1px #999999 solid;
margin-left: 12px;
float: left;
}
div.topNavNewsContact:hover
{
background-color: #F0FBC8;
}
div.topNavLimelight_Toggle
{
width: 20px;
float: left;
}
div.topNavLimelight_Toggle:hover
{
background-color: #F0FBC8;
}
div.topNavList1
{
vertical-align: top;
background-color: #FFFFFF;
width: 125px;
height: 120px;
border: 1px solid #5F7709;
position: absolute;
z-index: 10;
padding-left: 8px;
}
div.topNavList2
{
vertical-align: top;
background-color: #FFFFFF;
width: 150px;
height: 120px;
border: 1px solid #5F7709;
position: absolute;
z-index: 10;
padding-left: 8px;
}
div.topNavList3
{
vertical-align: top;
background-color: #FFFFFF;
width: 125px;
height: 95px;
border: 1px solid #5F7709;
position: absolute;
z-index: 10;
padding-left: 8px;
}
div.topNavListItem
{
width: 155px;
margin-top: 5px;
margin-bottom: 5px;
font-size: 14px;
}
a.topNavListItem
{
color: #999999;
}
a.topNavListItem:hover
{
color: #666666;
}
a.topNavbar
{
font-size: 16px;
color: #666666;
font-weight: bold;
}