hcblankscreen
08-14-2008, 07:46 AM
So I'm a student working on my first real project. I've done Suckerfish drop-downs before, but I'm having trouble doing them with graphic text instead of system text. The image replacement works fine on the first level, but the nested li's just repeat the image of the main li.
For example, the main nav item with the drop-down is "Our Coffee". In the drop-down menu instead of having the different images for the corresponding links, "Our Coffee" is repeated.
The drop-down is on the "Our Coffee" link http://www2.hawaii.edu/~bhcb/new_kimo/our_coffee.html .
And here's a selection of my code where I think the problem is happening:
<div id="nav">
<ul id="dd">
<li id="hm"><a href="menu.html">Menu</a></li>
<li id="au"><a href="about_us.html">About Us</a></li>
<li id="oc"><a href="#">Our Coffee</a>
<ul>
<li id="oc_dd_ko"><a href="oc_kona.html">Kona</a></li>
<li id="oc_dd_ma"><a href="oc_maui.html">Maui</a></li>
<li id="oc_dd_ka"><a href="oc_kauai.html">Kauai</a></li>
</ul>
</li>
<li id="os"><a href="os_hy.html">Our Stores</a></li>
<li id="ols"><a href="online_store.html">Online Store</a></li>
<li id="oct"><a href="our_culture.html">Our Culture</a></li>
</ul>
</div>
#nav ul li ul li a {
display: block;
height: 0px;
overflow: hidden;
}
#dd li#oc a {
display: block;
width: 95px;
}
#dd li#oc {
float: left;
width: 95px;
}
#dd li#oc ul {
position: absolute;
width: 95px;
left: -9999px;
}
#dd li#oc:hover ul {
left: auto;
}
#dd li#oc:hover ul, #dd li.sfhover ul {
left: auto;
}
li#oc ul li a {
height: 0px;
display: block;
overflow: hidden;
}
#oc_dd_ko a {
background: url(../images/oc_ddnav-01_lo.gif) no-repeat;
padding-top: 13px;
width: 58px;
}
#oc_dd_ko a:hover {
background: url(../images/oc_ddnav-01_hi.gif) no-repeat;
padding-top: 13px;
width: 58px;
}
#oc_dd_ma a {
background: url(../images/oc_ddnav-02_lo.gif) no-repeat;
padding-top: 15px;
width: 58px;
}
#oc_dd_ma a:hover {
background: url(../images/oc_ddnav-02_hi.gif) no-repeat;
padding-top: 15px;
width: 58px;
}
#oc_dd_ka a {
background: url(../images/oc_ddnav-03_lo.gif) no-repeat;
padding-top: 16px;
width: 58px;
}
#oc_dd_ka a:hover {
background: url(../images/oc_ddnav-03_hi.gif) no-repeat;
padding-top: 16px;
width: 58px;
}
#dd, #dd ul {
padding: 0;
margin: 0;
list-style: none;
}
Any suggestions would be appreciated.
For example, the main nav item with the drop-down is "Our Coffee". In the drop-down menu instead of having the different images for the corresponding links, "Our Coffee" is repeated.
The drop-down is on the "Our Coffee" link http://www2.hawaii.edu/~bhcb/new_kimo/our_coffee.html .
And here's a selection of my code where I think the problem is happening:
<div id="nav">
<ul id="dd">
<li id="hm"><a href="menu.html">Menu</a></li>
<li id="au"><a href="about_us.html">About Us</a></li>
<li id="oc"><a href="#">Our Coffee</a>
<ul>
<li id="oc_dd_ko"><a href="oc_kona.html">Kona</a></li>
<li id="oc_dd_ma"><a href="oc_maui.html">Maui</a></li>
<li id="oc_dd_ka"><a href="oc_kauai.html">Kauai</a></li>
</ul>
</li>
<li id="os"><a href="os_hy.html">Our Stores</a></li>
<li id="ols"><a href="online_store.html">Online Store</a></li>
<li id="oct"><a href="our_culture.html">Our Culture</a></li>
</ul>
</div>
#nav ul li ul li a {
display: block;
height: 0px;
overflow: hidden;
}
#dd li#oc a {
display: block;
width: 95px;
}
#dd li#oc {
float: left;
width: 95px;
}
#dd li#oc ul {
position: absolute;
width: 95px;
left: -9999px;
}
#dd li#oc:hover ul {
left: auto;
}
#dd li#oc:hover ul, #dd li.sfhover ul {
left: auto;
}
li#oc ul li a {
height: 0px;
display: block;
overflow: hidden;
}
#oc_dd_ko a {
background: url(../images/oc_ddnav-01_lo.gif) no-repeat;
padding-top: 13px;
width: 58px;
}
#oc_dd_ko a:hover {
background: url(../images/oc_ddnav-01_hi.gif) no-repeat;
padding-top: 13px;
width: 58px;
}
#oc_dd_ma a {
background: url(../images/oc_ddnav-02_lo.gif) no-repeat;
padding-top: 15px;
width: 58px;
}
#oc_dd_ma a:hover {
background: url(../images/oc_ddnav-02_hi.gif) no-repeat;
padding-top: 15px;
width: 58px;
}
#oc_dd_ka a {
background: url(../images/oc_ddnav-03_lo.gif) no-repeat;
padding-top: 16px;
width: 58px;
}
#oc_dd_ka a:hover {
background: url(../images/oc_ddnav-03_hi.gif) no-repeat;
padding-top: 16px;
width: 58px;
}
#dd, #dd ul {
padding: 0;
margin: 0;
list-style: none;
}
Any suggestions would be appreciated.