/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] IE6 nav container expands height, but need fixed – HELP!

Hey all,

I’m using CSS with un-order listed as my nav bar. I have a container div with the background color set and it works fine in IE7 and FF, but in IE6 the un-ordered list item expand the height of the div past what I have set it.

Example:

the div height is set to 24px, but the list items have a 1px border that is white. what happens is the 1px border gets added to the height of the div as well, but the background on the div is set to another color. So the nav bar list items look great but in the extra space that completes my header section there is a 1px under hang.

[URL=”http://www.webdeveloper.com/forum/attachment.php?attachmentid=11911&d=1228166485″]Picture of the 1px under hang (it’s to the bottom right)[/URL]

I need to borders to have the 1px space and it works fine in IE7 and FF, but need some help with IE6.

Any thoughts?

to post a comment
CSS

10 Comments(s)

Copy linkTweet thisAlerts:
@KDLADec 02.2008 — Can you include some code? The image is hard to read, and we need to know the method you used in order to suggest a workaround.
Copy linkTweet thisAlerts:
@Phill_PaffordauthorDec 02.2008 — Here is my other post with the code.
Copy linkTweet thisAlerts:
@Phill_PaffordauthorDec 02.2008 — Sorry cant post more code its behind corp firewall :-(

basically what I need to do is have a navbar that is user permission based.

Each user will have a different set of drop down options and categories from the navbar based from permissions.

I have a fixed width navbar container that I have made the same color as the menu buttons/dropdowns to keep the look and feel on the site.

So if a use has access to 5 categories it should have 5 list items for the nav, if 6 then 6 list items and so forth.

The problem comes from IE6 expanding the div navbar container to the list item size (Which is a 1 px border added to the list item). This shows the background from the div navbar container when it should be the color of the 1px border (Which is white).

Here is the site from which I'm using the navbar from. See how his last list item spans accrossed, but I wanted the div navbar container to span instead.

any insight?
Copy linkTweet thisAlerts:
@Phill_PaffordauthorDec 03.2008 — The CSS
[CODE]
/*-----------------------------------------------------------
Pure CSS Drop-down Menu
Last Updated: 12/31/2007 by Justin Spegele
Author: Justin Spegele
Spegele Design and Development
http://www.spegele.com/
This code is free to modify and use for any purpose, as
long as proper credit is given to the original designer.
----------------------------------------------------------- */

/* Overarching Menu
-----------------------------------*/
.cssnav {
position:relative;
z-index:1000;
font-size:12px;
font-family:Verdana, Arial, Helvetica, sans-serif;
font-weight:bold;
text-align:center;
height: 25px;
width: 100%;
background:#467aa7;
border:1px solid #fff;
}
.cssnav ul {
padding:0;
margin:0;
list-style-type:none;
}
.cssnav ul ul {
width:149px;
text-align:left;
}
/* Main list
-----------------------------------*/
.cssnav li {
float:left;
width:106px; /* This controls the width of the topnav */
position:relative;
background:none; /* Added to override style */
padding:0px; /* Added to override style */
}
/* First Level
-----------------------------------*/
/* Links */
.cssnav a, .cssnav a:visited {
display:block;
text-decoration:none;
color:#fefefe;
border:1px solid #fff;
border-width:0px 0px 1px 1px;
background:#467aa7;
line-height:25px;
}
/* Links on hover */
.cssnav a:hover, .cssnav ul ul a:hover{
color:#fff;
background:#80b0da;
}
.cssnav :hover > a, .cssnav ul ul :hover > a {
color:#fff;
background:#80b0da;
}
/* Second Level
-----------------------------------*/
/* Links */
.cssnav ul ul a, .cssnav ul ul a:visited {
background:#578bb8;
line-height:1em;
padding:5px 10px;
width:128px;
border-width:0 1px 1px 1px;
}
/* Links on hover */
.cssnav ul ul a:hover {
background:#80b0da;
}
/* Visibility */
.cssnav ul li:hover ul, .cssnav ul a:hover ul{
visibility:visible;
}
/* Third Level
-----------------------------------*/
/* Links */
.cssnav ul ul ul a, .cssnav ul ul ul a:visited {
background:#578bb8;
}
/* Links on hover */
.cssnav ul ul ul a:hover {
background:#80b0da;
}
/* Positioning */
.cssnav ul ul ul{
left:150px;
top:-1px;
}
.cssnav ul ul ul.left {
left:-150px;
}
/* Visibility */
.cssnav ul :hover ul ul{
visibility:hidden;
}
.cssnav ul :hover ul :hover ul{
visibility:visible;
}
/* All Sub Levels
-----------------------------------*/
/* Default visibility */
.cssnav ul ul {
visibility:hidden;
position:absolute;
top:26px;
left:0;
border-top:1px solid #fff;
}
/* IE Table
-----------------------------------*/
.cssnav table {
position:absolute;
top:0;
left:0;
border-collapse:collapse;
}
[/CODE]


// Sorry had to make it bare bones
[code=html]
<div class="cssnav">
<ul>
<li>
<a title="Home" target="_top" href="">
Home
</a></li><li>
<a href="#" >Here

<!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
<ul><li><a target="_top" href="#">

Link
</a></li></ul>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li><li>
<a href="#" title="Accounts">
Accounts

<!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
<ul><li><a title="Account Info" href="#">
Account Info
</a></li><li><a href="#">

Account Extra
</a></li><li><a href="#">
Search For Accounts
</a></li><li><a href="#">
Reset Password
</a></li></ul>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li><li>
<a href="#">More Links

<!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->

<ul><li><a title="More Links 1" href="#">
More Links 1
</a></li><li>
<a class="drop" href="#" title="More Links 2">More Links 2

<!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
<ul class="left"><li><a title="More Sub Links 1" href="#">
More Sub Links 1
</a></li><li><a title="More Sub Links 2" href="#">
More Sub Links 2
</a></li><li><a title="More Sub Links 3" href="#">

More Sub Links 3
</a></li></ul>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li><li><a title="More Links 3" href="#">
More Links 3
</a></li><li><a title="More Links 4" href="#">
More Links 4
</a></li><li><a title="More Links 5" href="#">
More Links 5
</a></li></ul>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->

</li><li>
<a href="#">More Links

<!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
<ul><li><a title="More Links 1" href="#">
More Links 1
</a></li><li>
<a class="drop" href="#" title="More Links 2">More Links 2

<!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->

<ul class="left"><li><a title="More Sub Links 1" href="#">
More Sub Links 1
</a></li><li><a title="More Sub Links 2" href="#">
More Sub Links 2
</a></li><li><a title="More Sub Links 3" href="#">
More Sub Links 3
</a></li></ul>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li><li><a title="More Links 3" href="#">
More Links 3
</a></li><li><a title="More Links 4" href="#">

More Links 4
</a></li><li><a title="More Links 5" href="#">
More Links 5
</a></li></ul>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li><li>
<a href="#">More Links

<!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
<ul><li><a title="More Links 1" href="#">

More Links 1
</a></li><li>
<a class="drop" href="#" title="More Links 2">More Links 2

<!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
<ul class="left"><li><a title="More Sub Links 1" href="#">
More Sub Links 1
</a></li><li><a title="More Sub Links 2" href="#">
More Sub Links 2
</a></li><li><a title="More Sub Links 3" href="#">
More Sub Links 3
</a></li></ul>

<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li><li><a title="More Links 3" href="#">
More Links 3
</a></li><li><a title="More Links 4" href="#">
More Links 4
</a></li><li><a title="More Links 5" href="#">
More Links 5
</a></li></ul>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li><li>

<a href="#">More Links

<!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
<ul><li><a title="More Links 1" href="#">
More Links 1
</a></li><li>
<a class="drop" href="#" title="More Links 2">More Links 2

<!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
<ul class="left"><li><a title="More Sub Links 1" href="#">

More Sub Links 1
</a></li><li><a title="More Sub Links 2" href="#">
More Sub Links 2
</a></li><li><a title="More Sub Links 3" href="#">
More Sub Links 3
</a></li></ul>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li><li><a title="More Links 3" href="#">
More Links 3
</a></li><li><a title="More Links 4" href="#">
More Links 4
</a></li><li><a title="More Links 5" href="#">

More Links 5
</a></li></ul>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li></ul></div>
[/code]
Copy linkTweet thisAlerts:
@KDLADec 03.2008 — <i>
</i>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
&lt;title&gt;Untitled Document&lt;/title&gt;
&lt;style type="text/css"&gt;
/*-----------------------------------------------------------
Pure CSS Drop-down Menu
Last Updated: 12/31/2007 by Justin Spegele
Author: Justin Spegele
Spegele Design and Development
http://www.spegele.com/
This code is free to modify and use for any purpose, as
long as proper credit is given to the original designer.
----------------------------------------------------------- */

/* Overarching Menu
-----------------------------------*/
.cssnav {
position:relative;
z-index:1000;
font-size:12px;
font-family:Verdana, Arial, Helvetica, sans-serif;
font-weight:bold;
text-align:center;
height: 25px;
overflow: visible;
width: 100&amp;#37;;
background:#467aa7;
border:1px solid #fff;
}
.cssnav ul {
padding:0;
margin:0;
list-style-type:none;
}
.cssnav ul ul {
width:149px;
text-align:left;
}
/* Main list
-----------------------------------*/
.cssnav li {
float:left;
width:106px; /* This controls the width of the topnav */
position:relative;
_top:1px;
background:none; /* Added to override style */
padding:0px; /* Added to override style */
}
/* First Level
-----------------------------------*/
/* Links */
.cssnav a, .cssnav a:visited {
display:block;
text-decoration:none;
color:#fefefe;
/*border:1px solid #fff;*/
border-bottom: 1px solid #fff;
border-left: 1px solid #fff;
/*border-width:0px 0px 1px 1px;*/
background:#467aa7;
line-height:25px;
height: 25px;
}
/* Links on hover */
.cssnav a:hover, .cssnav ul ul a:hover{
color:#fff;
background:#80b0da;
}
.cssnav :hover &gt; a, .cssnav ul ul :hover &gt; a {
color:#fff;
background:#80b0da;
}
/* Second Level
-----------------------------------*/
/* Links */
.cssnav ul ul a, .cssnav ul ul a:visited {
background:#578bb8;
line-height:1em;
padding:5px 10px;
width:128px;
border-width:0 1px 1px 1px;
}
/* Links on hover */
.cssnav ul ul a:hover {
background:#80b0da;
}
/* Visibility */
.cssnav ul li:hover ul, .cssnav ul a:hover ul{
visibility:visible;
}
/* Third Level
-----------------------------------*/
/* Links */
.cssnav ul ul ul a, .cssnav ul ul ul a:visited {
background:#578bb8;
}
/* Links on hover */
.cssnav ul ul ul a:hover {
background:#80b0da;
}
/* Positioning */
.cssnav ul ul ul{
left:150px;
top:-1px;
}
.cssnav ul ul ul.left {
left:-150px;
}
/* Visibility */
.cssnav ul :hover ul ul{
visibility:hidden;
}
.cssnav ul :hover ul :hover ul{
visibility:visible;
}
/* All Sub Levels
-----------------------------------*/
/* Default visibility */
.cssnav ul ul {
visibility:hidden;
position:absolute;
top:26px;
left:0;
border-top:1px solid #fff;
}
/* IE Table
-----------------------------------*/
.cssnav table {
position:absolute;
top:0;
left:0;
border-collapse:collapse;
}
&lt;/style&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;div class="cssnav"&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a title="Home" target="_top" href=""&gt;
Home
&lt;/a&gt;&lt;/li&gt;&lt;li&gt;
&lt;a href="#" &gt;Here

<i> </i> &lt;!--[if IE 7]&gt;&lt;!--&gt;&lt;/a&gt;&lt;!--&lt;![endif]--&gt;
<i> </i> &lt;!--[if lte IE 6]&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;![endif]--&gt;
<i> </i> &lt;ul&gt;&lt;li&gt;&lt;a target="_top" href="#"&gt;

<i> </i> Link
<i> </i> &lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
<i> </i> &lt;!--[if lte IE 6]&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/a&gt;&lt;![endif]--&gt;
<i> </i> &lt;/li&gt;&lt;li&gt;
<i> </i> &lt;a href="#" title="Accounts"&gt;
<i> </i> Accounts

<i> </i> &lt;!--[if IE 7]&gt;&lt;!--&gt;&lt;/a&gt;&lt;!--&lt;![endif]--&gt;
<i> </i> &lt;!--[if lte IE 6]&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;![endif]--&gt;
<i> </i> &lt;ul&gt;&lt;li&gt;&lt;a title="Account Info" href="#"&gt;
<i> </i> Account Info
<i> </i> &lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="#"&gt;

<i> </i> Account Extra
<i> </i> &lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="#"&gt;
<i> </i> Search For Accounts
<i> </i> &lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="#"&gt;
<i> </i> Reset Password
<i> </i> &lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
<i> </i> &lt;!--[if lte IE 6]&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/a&gt;&lt;![endif]--&gt;
<i> </i> &lt;/li&gt;&lt;li&gt;
<i> </i> &lt;a href="#"&gt;More Links

<i> </i> &lt;!--[if IE 7]&gt;&lt;!--&gt;&lt;/a&gt;&lt;!--&lt;![endif]--&gt;
<i> </i> &lt;!--[if lte IE 6]&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;![endif]--&gt;

<i> </i> &lt;ul&gt;&lt;li&gt;&lt;a title="More Links 1" href="#"&gt;
<i> </i> More Links 1
<i> </i> &lt;/a&gt;&lt;/li&gt;&lt;li&gt;
<i> </i> &lt;a class="drop" href="#" title="More Links 2"&gt;More Links 2

<i> </i> &lt;!--[if IE 7]&gt;&lt;!--&gt;&lt;/a&gt;&lt;!--&lt;![endif]--&gt;
<i> </i> &lt;!--[if lte IE 6]&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;![endif]--&gt;
<i> </i> &lt;ul class="left"&gt;&lt;li&gt;&lt;a title="More Sub Links 1" href="#"&gt;
<i> </i> More Sub Links 1
<i> </i> &lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a title="More Sub Links 2" href="#"&gt;
<i> </i> More Sub Links 2
<i> </i> &lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a title="More Sub Links 3" href="#"&gt;

<i> </i> More Sub Links 3
<i> </i> &lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
<i> </i> &lt;!--[if lte IE 6]&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/a&gt;&lt;![endif]--&gt;
<i> </i> &lt;/li&gt;&lt;li&gt;&lt;a title="More Links 3" href="#"&gt;
<i> </i> More Links 3
<i> </i> &lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a title="More Links 4" href="#"&gt;
<i> </i> More Links 4
<i> </i> &lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a title="More Links 5" href="#"&gt;
<i> </i> More Links 5
<i> </i> &lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
<i> </i> &lt;!--[if lte IE 6]&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/a&gt;&lt;![endif]--&gt;

<i> </i> &lt;/li&gt;&lt;li&gt;
<i> </i> &lt;a href="#"&gt;More Links

<i> </i> &lt;!--[if IE 7]&gt;&lt;!--&gt;&lt;/a&gt;&lt;!--&lt;![endif]--&gt;
<i> </i> &lt;!--[if lte IE 6]&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;![endif]--&gt;
<i> </i> &lt;ul&gt;&lt;li&gt;&lt;a title="More Links 1" href="#"&gt;
<i> </i> More Links 1
<i> </i> &lt;/a&gt;&lt;/li&gt;&lt;li&gt;
<i> </i> &lt;a class="drop" href="#" title="More Links 2"&gt;More Links 2

<i> </i> &lt;!--[if IE 7]&gt;&lt;!--&gt;&lt;/a&gt;&lt;!--&lt;![endif]--&gt;
<i> </i> &lt;!--[if lte IE 6]&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;![endif]--&gt;

<i> </i> &lt;ul class="left"&gt;&lt;li&gt;&lt;a title="More Sub Links 1" href="#"&gt;
<i> </i> More Sub Links 1
<i> </i> &lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a title="More Sub Links 2" href="#"&gt;
<i> </i> More Sub Links 2
<i> </i> &lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a title="More Sub Links 3" href="#"&gt;
<i> </i> More Sub Links 3
<i> </i> &lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
<i> </i> &lt;!--[if lte IE 6]&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/a&gt;&lt;![endif]--&gt;
<i> </i> &lt;/li&gt;&lt;li&gt;&lt;a title="More Links 3" href="#"&gt;
<i> </i> More Links 3
<i> </i> &lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a title="More Links 4" href="#"&gt;

<i> </i> More Links 4
<i> </i> &lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a title="More Links 5" href="#"&gt;
<i> </i> More Links 5
<i> </i> &lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
<i> </i> &lt;!--[if lte IE 6]&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/a&gt;&lt;![endif]--&gt;
<i> </i> &lt;/li&gt;&lt;li&gt;
<i> </i> &lt;a href="#"&gt;More Links

<i> </i> &lt;!--[if IE 7]&gt;&lt;!--&gt;&lt;/a&gt;&lt;!--&lt;![endif]--&gt;
<i> </i> &lt;!--[if lte IE 6]&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;![endif]--&gt;
<i> </i> &lt;ul&gt;&lt;li&gt;&lt;a title="More Links 1" href="#"&gt;

<i> </i> More Links 1
<i> </i> &lt;/a&gt;&lt;/li&gt;&lt;li&gt;
<i> </i> &lt;a class="drop" href="#" title="More Links 2"&gt;More Links 2

<i> </i> &lt;!--[if IE 7]&gt;&lt;!--&gt;&lt;/a&gt;&lt;!--&lt;![endif]--&gt;
<i> </i> &lt;!--[if lte IE 6]&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;![endif]--&gt;
<i> </i> &lt;ul class="left"&gt;&lt;li&gt;&lt;a title="More Sub Links 1" href="#"&gt;
<i> </i> More Sub Links 1
<i> </i> &lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a title="More Sub Links 2" href="#"&gt;
<i> </i> More Sub Links 2
<i> </i> &lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a title="More Sub Links 3" href="#"&gt;
<i> </i> More Sub Links 3
<i> </i> &lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;

<i> </i> &lt;!--[if lte IE 6]&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/a&gt;&lt;![endif]--&gt;
<i> </i> &lt;/li&gt;&lt;li&gt;&lt;a title="More Links 3" href="#"&gt;
<i> </i> More Links 3
<i> </i> &lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a title="More Links 4" href="#"&gt;
<i> </i> More Links 4
<i> </i> &lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a title="More Links 5" href="#"&gt;
<i> </i> More Links 5
<i> </i> &lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
<i> </i> &lt;!--[if lte IE 6]&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/a&gt;&lt;![endif]--&gt;
<i> </i> &lt;/li&gt;&lt;li&gt;

<i> </i> &lt;a href="#"&gt;More Links

<i> </i> &lt;!--[if IE 7]&gt;&lt;!--&gt;&lt;/a&gt;&lt;!--&lt;![endif]--&gt;
<i> </i> &lt;!--[if lte IE 6]&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;![endif]--&gt;
<i> </i> &lt;ul&gt;&lt;li&gt;&lt;a title="More Links 1" href="#"&gt;
<i> </i> More Links 1
<i> </i> &lt;/a&gt;&lt;/li&gt;&lt;li&gt;
<i> </i> &lt;a class="drop" href="#" title="More Links 2"&gt;More Links 2

<i> </i> &lt;!--[if IE 7]&gt;&lt;!--&gt;&lt;/a&gt;&lt;!--&lt;![endif]--&gt;
<i> </i> &lt;!--[if lte IE 6]&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;![endif]--&gt;
<i> </i> &lt;ul class="left"&gt;&lt;li&gt;&lt;a title="More Sub Links 1" href="#"&gt;

<i> </i> More Sub Links 1
<i> </i> &lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a title="More Sub Links 2" href="#"&gt;
<i> </i> More Sub Links 2
<i> </i> &lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a title="More Sub Links 3" href="#"&gt;
<i> </i> More Sub Links 3
<i> </i> &lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
<i> </i> &lt;!--[if lte IE 6]&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/a&gt;&lt;![endif]--&gt;
<i> </i> &lt;/li&gt;&lt;li&gt;&lt;a title="More Links 3" href="#"&gt;
<i> </i> More Links 3
<i> </i> &lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a title="More Links 4" href="#"&gt;
<i> </i> More Links 4
<i> </i> &lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a title="More Links 5" href="#"&gt;

<i> </i> More Links 5
<i> </i> &lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
<i> </i> &lt;!--[if lte IE 6]&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/a&gt;&lt;![endif]--&gt;
<i> </i> &lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;


This is pretty close to what you need. The culprit was the positioning of the <ul>.

Tested in IE6 and Fx3.
Copy linkTweet thisAlerts:
@Phill_PaffordauthorDec 03.2008 — Yeah!!! That did the trick.

I changed one line though: you added height: 25px;

I just removed it cause it was causing the drop down menus to look bigger then I wanted.

I did have one more question regarding the _top: 1px;

What does this do?
Copy linkTweet thisAlerts:
@KDLADec 03.2008 — Yeah!!! That did the trick.

I changed one line though: you added height: 25px;

I just removed it cause it was causing the drop down menus to look bigger then I wanted.[/quote]

I might have done that when testing solutions, and didn't remove it.

I did have one more question regarding the _top: 1px;

What does this do?[/QUOTE]

It's an IE hack. IE will read that, but Fx won't. It's placing the <li> 1px under where it should be -- I think the combo. of border and positioning caused that; I'm not sure. It was one of those accidental "ah ha!" moments.
Copy linkTweet thisAlerts:
@Phill_PaffordauthorDec 03.2008 — Thanks will make a mental note of that ;-)

Also one last question, now that there is the _top: 1px added to IE I noticed that there is a dead hover over space when transitioning from the top navbar to the drop down menus below it. Again it's only for IE6 works fine in IE7 and FF.

If I remove the _top: 1px it works fine but then I'm back to the 1px under hang, Ughh.

any other pearls of wisdom?
Copy linkTweet thisAlerts:
@KDLADec 03.2008 — <i>
</i>&lt;style type="text/css"&gt;
/*-----------------------------------------------------------
Pure CSS Drop-down Menu
Last Updated: 12/31/2007 by Justin Spegele
Author: Justin Spegele
Spegele Design and Development
http://www.spegele.com/
This code is free to modify and use for any purpose, as
long as proper credit is given to the original designer.
----------------------------------------------------------- */

/* Overarching Menu
-----------------------------------*/
.cssnav {
position:relative;
z-index:1000;
font-size:12px;
font-family:Verdana, Arial, Helvetica, sans-serif;
font-weight:bold;
text-align:center;
height: 25px;
overflow: visible;
width: 100&amp;#37;;
background:#467aa7;
border:1px solid #fff;
}
.cssnav ul {
padding:0;
margin:0;
list-style-type:none;
}
.cssnav ul ul {
width:149px;
text-align:left;
}
/* Main list
-----------------------------------*/
.cssnav li {
float:left;
width:106px; /* This controls the width of the topnav */
position:relative;
background:none; /* Added to override style */
padding:0px; /* Added to override style */
}
/* First Level
-----------------------------------*/
/* Links */
.cssnav a, .cssnav a:visited {
display:block;
text-decoration:none;
color:#fefefe;
/*border:1px solid #fff;*/
border-left: 1px solid #fff;
/*border-width:0px 0px 1px 1px;*/
background:#467aa7;
line-height:25px;
height: 25px;
}
.cssnav li li a { border-bottom: 1px solid #fff;
}
/* Links on hover */
.cssnav a:hover, .cssnav ul ul a:hover{
color:#fff;
background:#80b0da;
}
.cssnav :hover &gt; a, .cssnav ul ul :hover &gt; a {
color:#fff;
background:#80b0da;
}
/* Second Level
-----------------------------------*/
/* Links */
.cssnav ul ul a, .cssnav ul ul a:visited {
background:#578bb8;
line-height:1em;
padding:5px 10px;
width:128px;
border-width:0 1px 1px 1px;
}
/* Links on hover */
.cssnav ul ul a:hover {
background:#80b0da;
}
/* Visibility */
.cssnav ul li:hover ul, .cssnav ul a:hover ul{
visibility:visible;
}
/* Third Level
-----------------------------------*/
/* Links */
.cssnav ul ul ul a, .cssnav ul ul ul a:visited {
background:#578bb8;
}
/* Links on hover */
.cssnav ul ul ul a:hover {
background:#80b0da;
}
/* Positioning */
.cssnav ul ul ul{
left:150px;
top:-1px;
}
.cssnav ul ul ul.left {
left:-150px;
}
/* Visibility */
.cssnav ul :hover ul ul{
visibility:hidden;
}
.cssnav ul :hover ul :hover ul{
visibility:visible;
}
/* All Sub Levels
-----------------------------------*/
/* Default visibility */
.cssnav ul ul {
visibility:hidden;
position:absolute;
top:26px;
left:0;
border-top:1px solid #fff;
}
/* IE Table
-----------------------------------*/
.cssnav table {
position:absolute;
top:0;
left:0;
border-collapse:collapse;
}
&lt;/style&gt;

I took the "border-bottom" out of the <li>, and applied it only to the nested <li>.

Oh - BTW - this is where we both go "Doh!"
Copy linkTweet thisAlerts:
@Phill_PaffordauthorDec 03.2008 — DOH

That works, thanks again for all your help.
×

Success!

Help @Phill_Pafford spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...