finstah1
11-01-2006, 09:13 PM
I have a horizontal menu that works great in FF, Mozilla and NN7 but doesn't span the entire 'box' in IE 6 or IE7. Can someone see something I missed here somewhere?
I've listed the code and attached a screen shot of both browsers. Any help is much appreciated. :)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<style>
body, html {
margin: 0;
padding: 0;
color: #6F7376;
background-color: #FDFFEE;
line-height: 130%;
font-family: "Franklin Gothic Medium", "Trebuchet MS", Verdana, Helvetica, Arial, sans-serif;
font-size: 90%;
text-align: center;
}
#wrapper-header { background: #222;}
#header, #menu {
width: 760px;
margin: 0 auto;
}
#wrapper-menu {
background:transparent url(images/bgd_nav_light.png) top left repeat-x;
float: left;
width: 100%;
}
/* menu items start */
#menu {
font-size: 85%;
font-weight: bold;
font-family: "Franklin Gothic Medium", "Trebuchet MS", Verdana, Helvetica, Arial, sans-serif;
white-space: nowrap; /* stops half a menu link dropping to next line. Instead, the whole link will drop. This only happens if you have a lot of menu links, and large text size */
padding-right: 0px; /* (Was 2px. Makes below irrelevant when changed too. CL 10/04/06.) The menu far left, and far right borders are not quite lining up in non IE browsers for some reason. This makes it less noticable */
}
#menu ul {
text-align: center;
margin: 0;
padding: 0;
list-style: none;
float: left;
width: 100%;
background-color: #87143C;
}
#menu li { display: block; width: 189px; }
#menu li.first a { border-left: 1px solid #FFFFFF; }
#menu li.last a, #menu li.last a:link { border-right: 1px solid #FFFFFF; width: 188px}
#menu a:link, #menu a:visited {
padding: 0; /* and 1em */
color: #CF6B74;
text-decoration: none;
float: left;
width: 189px;
border-right: 1px solid #FFFFFF;
}
#menu a:hover {
color: #FFFFFF;
background:transparent url(images/bgd_nav.gif) top left repeat-x;
}
/* menu items end */
/*Set this width 2% smaller than the above */
#content, #footer {
width: 740px;
margin: 0 auto;
}
#wrapper-menu {
background:transparent url(images/bgd_nav_light.png) top left repeat-x;
float: left;
width: 100%;
}
/* menu items start */
#menu {
font-size: 85%;
font-weight: bold;
font-family: "Franklin Gothic Medium", "Trebuchet MS", Verdana, Helvetica, Arial, sans-serif;
white-space: nowrap; /* stops half a menu link dropping to next line. Instead, the whole link will drop. This only happens if you have a lot of menu links, and large text size */
padding-right: 0px; /* (Was 2px. Makes below irrelevant when changed too. CL 10/04/06.) The menu far left, and far right borders are not quite lining up in non IE browsers for some reason. This makes it less noticable */
}
#menu ul {
text-align: center;
margin: 0;
padding: 0;
list-style: none;
float: left;
width: 100%;
background-color: #87143C;
}
#menu li { display: block; width: 189px; }
#menu li.first a { border-left: 1px solid #FFFFFF; }
#menu li.last a, #menu li.last a:link { border-right: 1px solid #FFFFFF; width: 188px}
#menu a:link, #menu a:visited {
padding: 0; /* and 1em */
color: #CF6B74;
text-decoration: none;
float: left;
width: 189px;
border-right: 1px solid #FFFFFF;
}
#menu a:hover {
color: #FFFFFF;
background:transparent url(images/bgd_nav.gif) top left repeat-x;
}
/* menu items end */
#content {
padding: 3.5em 10px 20px 10px;
border-left: 1px solid #bbb;
border-right: 1px solid #bbb;
background: #FFFFFF;
height: 560px;
text-align: right;
}
/* footer styles */
#bar-bottom ul {
display: block;
clear: both;
padding: 2em 10px;
text-align: center;
letter-spacing: 0.05em;
border: 1px solid #222;
font-size: 80%;
}
div#bar-bottom ul li {
display: inline;
list-style-type: none;
margin: 0px;
font: normal 11px/14px "Franklin Gothic Medium", "Trebuchet MS", Verdana, Helvetica, Arial, sans-serif;
color: #FDFFEE;
}
div#bar-bottom ul li a {
font: normal 11px/14px "Franklin Gothic Medium", "Trebuchet MS", Verdana, Helvetica, Arial, sans-serif;
color: #87143C; /* 637800; */
text-decoration: underline;
}
div#bar-bottom ul li a:hover {text-decoration: underline;}
#bar-bottom {
width: 100%;
height: 100px;
position:relative;
background-color: #222;
border: 1px solid #222222;
}
#home a.home, #eyecandy a.eyecandy, #resonance a.resonance, #shoutout a.shoutout, #xspot a.xspot {
background-color: #979983;
color: #CCCCCC;
}
#home a:hover.home, #eyecandy a:hover.eyecandy, #resonance a:hover.resonance, #shoutout a:hover.shoutout, #xspot a:hover.xspot {
background: #979983;
color: #CCCCCC;
}
</style>
<!--[if IE]>
<style type="text/css">
/*** Fix nav bar layout in IE ***/
#menu { padding-right: 2px; white-space: nowrap; clear: left;} See above comment. This re-adjusts IE to the above padding on other #menu item above
#content { padding-top: 1.8em; } /* Set padding top in IE to 20px */
#menu li { display: inline; width: 188px; height: 24px;}
#menu li.first a { border-left: 1px solid #FFFFFF;}
#menu li.last a, #menu li.last a:link { border-right: 1px solid #FFFFFF; color: #CCCCCC;}
#menu a:link, #menu a:visited {
padding: 0;
color: #CF6B74;
text-decoration: none;
float: left;
width: 188px;
border-right: 1px solid #FFFFFF;
}
</style>
<![endif]-->
</head>
<body id="shoutout">
<div id="wrapper-header">
</div>
<div id="wrapper-menu">
<div id="menu">
<ul>
<li class="first"><a class="home" href="index.php" title="Home">Home</a></li>
<li><a class="eyecandy" href="image/" title="Pictures">Eye candy</a></li>
<li><a class="resonance" href="song/" title="Music">Resonance</a></li>
<li class="last"><a class="shoutout" href="contact/" title="Contact us">Give a shout out</a></li>
</ul>
</div>
</div>
<div id="content">
</div>
<div id="bar-bottom">
<ul>
<li>Copyright © 2004-2006</li>
</ul>
</div>
</body>
</html>
I've listed the code and attached a screen shot of both browsers. Any help is much appreciated. :)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<style>
body, html {
margin: 0;
padding: 0;
color: #6F7376;
background-color: #FDFFEE;
line-height: 130%;
font-family: "Franklin Gothic Medium", "Trebuchet MS", Verdana, Helvetica, Arial, sans-serif;
font-size: 90%;
text-align: center;
}
#wrapper-header { background: #222;}
#header, #menu {
width: 760px;
margin: 0 auto;
}
#wrapper-menu {
background:transparent url(images/bgd_nav_light.png) top left repeat-x;
float: left;
width: 100%;
}
/* menu items start */
#menu {
font-size: 85%;
font-weight: bold;
font-family: "Franklin Gothic Medium", "Trebuchet MS", Verdana, Helvetica, Arial, sans-serif;
white-space: nowrap; /* stops half a menu link dropping to next line. Instead, the whole link will drop. This only happens if you have a lot of menu links, and large text size */
padding-right: 0px; /* (Was 2px. Makes below irrelevant when changed too. CL 10/04/06.) The menu far left, and far right borders are not quite lining up in non IE browsers for some reason. This makes it less noticable */
}
#menu ul {
text-align: center;
margin: 0;
padding: 0;
list-style: none;
float: left;
width: 100%;
background-color: #87143C;
}
#menu li { display: block; width: 189px; }
#menu li.first a { border-left: 1px solid #FFFFFF; }
#menu li.last a, #menu li.last a:link { border-right: 1px solid #FFFFFF; width: 188px}
#menu a:link, #menu a:visited {
padding: 0; /* and 1em */
color: #CF6B74;
text-decoration: none;
float: left;
width: 189px;
border-right: 1px solid #FFFFFF;
}
#menu a:hover {
color: #FFFFFF;
background:transparent url(images/bgd_nav.gif) top left repeat-x;
}
/* menu items end */
/*Set this width 2% smaller than the above */
#content, #footer {
width: 740px;
margin: 0 auto;
}
#wrapper-menu {
background:transparent url(images/bgd_nav_light.png) top left repeat-x;
float: left;
width: 100%;
}
/* menu items start */
#menu {
font-size: 85%;
font-weight: bold;
font-family: "Franklin Gothic Medium", "Trebuchet MS", Verdana, Helvetica, Arial, sans-serif;
white-space: nowrap; /* stops half a menu link dropping to next line. Instead, the whole link will drop. This only happens if you have a lot of menu links, and large text size */
padding-right: 0px; /* (Was 2px. Makes below irrelevant when changed too. CL 10/04/06.) The menu far left, and far right borders are not quite lining up in non IE browsers for some reason. This makes it less noticable */
}
#menu ul {
text-align: center;
margin: 0;
padding: 0;
list-style: none;
float: left;
width: 100%;
background-color: #87143C;
}
#menu li { display: block; width: 189px; }
#menu li.first a { border-left: 1px solid #FFFFFF; }
#menu li.last a, #menu li.last a:link { border-right: 1px solid #FFFFFF; width: 188px}
#menu a:link, #menu a:visited {
padding: 0; /* and 1em */
color: #CF6B74;
text-decoration: none;
float: left;
width: 189px;
border-right: 1px solid #FFFFFF;
}
#menu a:hover {
color: #FFFFFF;
background:transparent url(images/bgd_nav.gif) top left repeat-x;
}
/* menu items end */
#content {
padding: 3.5em 10px 20px 10px;
border-left: 1px solid #bbb;
border-right: 1px solid #bbb;
background: #FFFFFF;
height: 560px;
text-align: right;
}
/* footer styles */
#bar-bottom ul {
display: block;
clear: both;
padding: 2em 10px;
text-align: center;
letter-spacing: 0.05em;
border: 1px solid #222;
font-size: 80%;
}
div#bar-bottom ul li {
display: inline;
list-style-type: none;
margin: 0px;
font: normal 11px/14px "Franklin Gothic Medium", "Trebuchet MS", Verdana, Helvetica, Arial, sans-serif;
color: #FDFFEE;
}
div#bar-bottom ul li a {
font: normal 11px/14px "Franklin Gothic Medium", "Trebuchet MS", Verdana, Helvetica, Arial, sans-serif;
color: #87143C; /* 637800; */
text-decoration: underline;
}
div#bar-bottom ul li a:hover {text-decoration: underline;}
#bar-bottom {
width: 100%;
height: 100px;
position:relative;
background-color: #222;
border: 1px solid #222222;
}
#home a.home, #eyecandy a.eyecandy, #resonance a.resonance, #shoutout a.shoutout, #xspot a.xspot {
background-color: #979983;
color: #CCCCCC;
}
#home a:hover.home, #eyecandy a:hover.eyecandy, #resonance a:hover.resonance, #shoutout a:hover.shoutout, #xspot a:hover.xspot {
background: #979983;
color: #CCCCCC;
}
</style>
<!--[if IE]>
<style type="text/css">
/*** Fix nav bar layout in IE ***/
#menu { padding-right: 2px; white-space: nowrap; clear: left;} See above comment. This re-adjusts IE to the above padding on other #menu item above
#content { padding-top: 1.8em; } /* Set padding top in IE to 20px */
#menu li { display: inline; width: 188px; height: 24px;}
#menu li.first a { border-left: 1px solid #FFFFFF;}
#menu li.last a, #menu li.last a:link { border-right: 1px solid #FFFFFF; color: #CCCCCC;}
#menu a:link, #menu a:visited {
padding: 0;
color: #CF6B74;
text-decoration: none;
float: left;
width: 188px;
border-right: 1px solid #FFFFFF;
}
</style>
<![endif]-->
</head>
<body id="shoutout">
<div id="wrapper-header">
</div>
<div id="wrapper-menu">
<div id="menu">
<ul>
<li class="first"><a class="home" href="index.php" title="Home">Home</a></li>
<li><a class="eyecandy" href="image/" title="Pictures">Eye candy</a></li>
<li><a class="resonance" href="song/" title="Music">Resonance</a></li>
<li class="last"><a class="shoutout" href="contact/" title="Contact us">Give a shout out</a></li>
</ul>
</div>
</div>
<div id="content">
</div>
<div id="bar-bottom">
<ul>
<li>Copyright © 2004-2006</li>
</ul>
</div>
</body>
</html>