bydesign
05-13-2008, 05:57 AM
Is anyone good on suckerfish dropdowns?
I'm trying to create a nav-bar that has a suckerfish dropdown, without having a fixed width on the list items - is this possible?
(The navigation items differ in width and the nav-bar just looks crap if I fix the width on the items)
Here's the link to the page:
www.ashby-design.co.uk/mslexia/index2.html (http://www.ashby-design.co.uk/mslexia/index2.html)
I've included the relevant css for the 'mainnav' below.
There are a couple of issues:
1) I'm not able to check how it's working on Internet Explorer until later today (I work on a mac and initially test on Safari, Firefox and Opera). Is anyone out there can see how it's getting on?
2) In Firefox the width of the secondary <ul> doesn't match the width of the primary one - can this be remedied (again, without fixing the width…).
THE CSS
From: www.ashby-design.co.uk/mslexia/css/default2.css (http://www.ashby-design.co.uk/mslexia/css/default2.css)
/* =Main Nav
-----------------------------------------------------------------------------*/
/* mainnav list */
ul#mainnav {
width: 100%;
float: left;
background-color:#000;
margin-bottom: 5em;
}
/* mainnav list items */
ul#mainnav li {
position: relative;
float: left;
z-index: 10
}
ul#mainnav a {
display: block;
padding: 0 1em;
font-size: 1.3em;
text-transform: uppercase;
letter-spacing: 1px;
line-height: 3.5em;
background: url(../images/architecture/divider.gif) no-repeat left 50%;
}
ul#mainnav .first a {padding-left: 15px; background: none}
/* mainnav second-level lists */
ul#mainnav li ul {
display: none;
top: 1em;
left: 0;
position: absolute;
padding-bottom: 10px;
border-bottom-style: solid;
border-bottom-width: 5px;
background-image: url(../images/architecture/mainnav_bg.png);
}
ul#mainnav li ul a {
padding: 0 0.8em 0 1em;
line-height: 2em;
text-transform: none;
letter-spacing: normal;
background: none;
}
ul#mainnav li > ul { /* to override top and left in browsers other than IE, which will position to the top right of the containing li, rather than bottom left */
top: auto;
left: auto;
}
ul#mainnav li:hover ul, ul#mainnav li.over ul { /* lists nested under hovered list items */
display: block; }
I'm trying to create a nav-bar that has a suckerfish dropdown, without having a fixed width on the list items - is this possible?
(The navigation items differ in width and the nav-bar just looks crap if I fix the width on the items)
Here's the link to the page:
www.ashby-design.co.uk/mslexia/index2.html (http://www.ashby-design.co.uk/mslexia/index2.html)
I've included the relevant css for the 'mainnav' below.
There are a couple of issues:
1) I'm not able to check how it's working on Internet Explorer until later today (I work on a mac and initially test on Safari, Firefox and Opera). Is anyone out there can see how it's getting on?
2) In Firefox the width of the secondary <ul> doesn't match the width of the primary one - can this be remedied (again, without fixing the width…).
THE CSS
From: www.ashby-design.co.uk/mslexia/css/default2.css (http://www.ashby-design.co.uk/mslexia/css/default2.css)
/* =Main Nav
-----------------------------------------------------------------------------*/
/* mainnav list */
ul#mainnav {
width: 100%;
float: left;
background-color:#000;
margin-bottom: 5em;
}
/* mainnav list items */
ul#mainnav li {
position: relative;
float: left;
z-index: 10
}
ul#mainnav a {
display: block;
padding: 0 1em;
font-size: 1.3em;
text-transform: uppercase;
letter-spacing: 1px;
line-height: 3.5em;
background: url(../images/architecture/divider.gif) no-repeat left 50%;
}
ul#mainnav .first a {padding-left: 15px; background: none}
/* mainnav second-level lists */
ul#mainnav li ul {
display: none;
top: 1em;
left: 0;
position: absolute;
padding-bottom: 10px;
border-bottom-style: solid;
border-bottom-width: 5px;
background-image: url(../images/architecture/mainnav_bg.png);
}
ul#mainnav li ul a {
padding: 0 0.8em 0 1em;
line-height: 2em;
text-transform: none;
letter-spacing: normal;
background: none;
}
ul#mainnav li > ul { /* to override top and left in browsers other than IE, which will position to the top right of the containing li, rather than bottom left */
top: auto;
left: auto;
}
ul#mainnav li:hover ul, ul#mainnav li.over ul { /* lists nested under hovered list items */
display: block; }