View Full Version : SuckerTree Horizontal Menu Issue

08-13-2007, 11:01 PM
1) Script Title: SuckerTree Horizontal Menu

2) Script URL (on DD): http://www.dynamicdrive.com/style/csslibrary/item/suckertree-menu-horizontal/

3) Describe problem: I need to remove the gap space between the drop down categories, but I cannot figure it out. My menu is located at www.e4deal.com. Thanks for your help.
Here is the code:

<!-- drop down menu code -->

<style type="text/css">

/*Credits: Dynamic Drive CSS Library */
/*URL: http://www.dynamicdrive.com/style/ */

.suckertreemenu ul{
margin: 0;
padding: 0 0 0 0;
list-style-type: none;
background-color: black; /*overall menu background color*/

.home {
background-image: url("<?=DIR_WS_TEMPLATE_IMAGES;?>menu_tab_ora.gif") !important;

.home a{
background-image: url("<?=DIR_WS_TEMPLATE_IMAGES;?>menu_tab_ora.gif") !important;

/*Top level list items*/
.suckertreemenu ul li{
position: relative;
display: inline;
float: left;
background-image: url("<?=DIR_WS_TEMPLATE_IMAGES;?>menu_tab_blk.gif");
width: 80px;
height: 30px;
margin-top: 0px;

/*Top level menu link items style*/
.suckertreemenu ul li a{
display: block;
width: auto; /*Width of top level menu link items*/
height: 15px;
padding: 2px 1px;
border: 0px solid black;
border-left-width: 0;
text-decoration: none;
color: white;
background-image: url("<?=DIR_WS_TEMPLATE_IMAGES;?>menu_tab_blk.gif");

/*1st sub level menu*/
.suckertreemenu ul li ul{
left: 0;
position: absolute;
text-align: left;
padding-left: 5px;
width: 130px;
top: 1em; /* no need to change, as true value set by script */
display: block;
visibility: hidden;
background-color: black; /*overall menu background color*/

/*Sub level menu list items (undo style from Top level List Items)*/
.suckertreemenu ul li ul li{
display: list-item;
float: none;

/*All subsequent sub menu levels offset after 1st level sub menu */
.suckertreemenu ul li ul li ul{
left: 159px; /* no need to change, as true value set by script */
top: 0;

/* Sub level menu links style */
.suckertreemenu ul li ul li a{
display: block;
width: 120px; /*width of sub menu levels*/
color: white;
text-decoration: none;
border: 0px solid #ccc;

.suckertreemenu ul li a:hover{
color: white;

* html p#iepara{ /*For a paragraph (if any) that immediately follows suckertree menu, add 1em top spacing between the two in IE*/

/* Holly Hack for IE \*/
* html .suckertreemenu ul li { float: left; height: 1&#37;; }
* html .suckertreemenu ul li a { height: 1%; }
/* End */

ul #treemenu1 li{

<!-- BOF ==================================== DHTML ==================================== -->
<link rel="stylesheet" href=" az_popup.css" media="print,screen" type="text/css" />
<script type="text/javascript">

//SuckerTree Horizontal Menu (Sept 14th, 06)
//By Dynamic Drive: http://www.dynamicdrive.com/style/

var menuids=["treemenu1"] //Enter id(s) of SuckerTree UL menus, separated by commas

function buildsubmenus_horizontal(){
for (var i=0; i<menuids.length; i++){
var ultags=document.getElementById(menuids[i]).getElementsByTagName("ul")
for (var t=0; t<ultags.length; t++){
if (ultags[t].parentNode.parentNode.id==menuids[i]){ //if this is a first level submenu
ultags[t].style.top=ultags[t].parentNode.offsetHeight+"px"//dynamically position first level submenus to be height of main menu item
else{ //else if this is a sub level menu (ul)
ultags[t].style.left=ultags[t-1].getElementsByTagName("a")[0].offsetWidth+"px" //position menu to the right of menu item that activated it

if (window.addEventListener)
window.addEventListener("load", buildsubmenus_horizontal, false)
else if (window.attachEvent)
window.attachEvent("onload", buildsubmenus_horizontal)


<!-- end of drop down menu code -->

08-14-2007, 05:20 PM
Update; I have solved this issue now, thanks anyway.