PDA

View Full Version : Placing the hovermenu the right place


kaweb
09-20-2005, 08:04 AM
I'm not sure if this is the right place for this post, so please excuse me if it is not.

I'm currently working on a website that should have a hovermenu with submenus on the left side. I have worked my way out from the advanced categories.php, but I have a problem when I try to place the hovermenu. It seems to move down below the table in which I have placed the menu.

In explorer I have no problems.
But in Firefox I have the problem mentioned above.

This is the link to my website:
colleges.dk (http://www.colleges.dk)

Can someone help me. :( This is the source code for categories.php:

<?php

if(&#33;defined(&#39;IN_SUBDREAMER&#39;))
{
die("Hacking attempt&#33;");
}


if(&#036;usehovermenu = &#036;DB->query_first("SELECT categoryid FROM " . TABLE_PREFIX . "categories WHERE parentid &#33;= 0 LIMIT 1"))
{
echo "<style type=&#092;"text/css&#092;">
.mtable
{
border-top: 1px solid #a2a2a2;
border-left: 1px solid #a2a2a2;
border-right: 1px solid #a2a2a2;
border-bottom: 1px solid #a2a2a2;
background-color: #ffffff;
}

.a0
{
font-family: verdana, arial;
}

.a1
{
font-family: verdana, arial;
background: #e9e9e9;
}

.categorydefault
{
font: 10px verdana; color: #b3b3b3; text-decoration: none; font-weight:bold; font-stretch: expanded; line-height: 10px;
}

.categoryhover
{
font: 10px verdana; color: #909090; text-decoration: none; font-weight:bold; font-stretch: expanded; line-height: 10px; border-bottom: 1px solid #ccc;
}

.categoryclicked
{
font: 10px verdana; color: #909090; text-decoration: none; font-weight:bold; font-stretch: expanded; line-height: 10px; border-bottom: 1px solid #ccc;
}
</style>


&#60;script language=&#092;"JavaScript&#092;">
&#60;&#33;--

// preload a few images for the hovermenu
var ii0 = new Image(); ii0.src = &#39;includes/javascript/hovermenu/pixel.gif&#39;;
var ii1 = new Image(); ii1.src = &#39;skins/advanced/images/subcategory_arrow.gif&#39;;

function wrap_root (text)
{
/*normal, hover, click*/
return [&#39;<table cellpadding=0 cellspacing=0 border=0 width=150px><tr><td><table cellpadding=0 cellspacing=0 border=0 width=150px ><tr><td width=150px class=categorydefault> &#39; + text + &#39; </td></tr></table></td></tr></table>&#39;,
&#39;<table cellpadding=0 cellspacing=0 border=0 width=150px><tr><td><table cellpadding=0 cellspacing=0 border=0 width=150px ><tr><td width=150px class=categoryhover > &#39; + text + &#39; </td></tr></table></td></tr></table>&#39;,
&#39;<table cellpadding=0 cellspacing=0 border=0 width=150px><tr><td><table cellpadding=0 cellspacing=0 border=0 width=150px ><tr><td width=150px class=categoryclicked> &#39; + text + &#39; </td></tr></table></td></tr></table>&#39;
];
}

function wrap_parent (text)
{
/*normal, hover, click*/
return [[&#39;<table cellpadding=0 cellspacing=0 border=0 width=150px><tr><td width=150px class=a0> &#39;, text, &#39;</td></tr></table>&#39;].join(&#39;&#39;),
[&#39;<table cellpadding=0 cellspacing=0 border=0 width=150px><tr><td width=150px class=a1> &#39;, text, &#39;</td></tr></table>&#39;].join(&#39;&#39;),
[&#39;<table cellpadding=0 cellspacing=0 border=0 width=150px><tr><td width=150px class=a1> &#39;, text, &#39;</td></tr></table>&#39;].join(&#39;&#39;)
];
}

function wrap_child (text)
{
/*normal, hover, click*/
return [[&#39;<table cellpadding=0 cellspacing=0 border=0 width=150px><tr><td width=150px class=a0> &#39;, text, &#39;</td></tr></table>&#39;].join(&#39;&#39;),
[&#39;<table cellpadding=0 cellspacing=0 border=0 width=150px><tr><td width=150px class=a1> &#39;, text, &#39;</td></tr></table>&#39;].join(&#39;&#39;),
[&#39;<table cellpadding=0 cellspacing=0 border=0 width=150px><tr><td width=150px class=a1#cccccc> &#39;, text, &#39;</td></tr></table>&#39;].join(&#39;&#39;)
];
}


var MENU_POS =[
// Level 0 block configuration
{
// Item&#39;s height in pixels
&#39;height&#39; : 21,

// Item&#39;s width in pixels
&#39;width&#39; : 120,

// if Block Orientation is vertical
&#39;vertical&#39; : true,

// Time Delay in milliseconds before subling block expands
// after mouse pointer overs an item
&#39;expd_delay&#39; : 0,

// Style class names for the level
&#39;css&#39;:
{
// Block outing table class
&#39;table&#39; : &#39;&#39;,

// Item outer tag style class for all item states or
// classes for [<default state>, <hovered state>, <clicked state>]
&#39;outer&#39; : &#39;&#39;,

// Item inner tag style class for all item states or
// classes for [<default state>, <hovered state>, <clicked state>]
&#39;inner&#39; : &#39;&#39;
}
},
// Level 1 block configuration
{
&#39;width&#39; : 140,
&#39;height&#39; : 14,

// Vertical Offset between adjacent levels in pixels
&#39;block_top&#39; : 19,

// Horizontal Offset between adjacent levels in pixels
&#39;block_right&#39; : 100,

// block behaviour if single frame:
// 1 - shift to the edge, 2 - flip relatively to left upper corner
&#39;wise_pos&#39; : 2,
&#39;vertical&#39; : true,

// transition effects for the block
// [index on expand, duration on expand, index on collapse, duration on collapse]
&#39;transition&#39; : [1, 0.3, 1, 0.3],

// Time Delay in milliseconds before menu collapses after mouse
// pointer lefts all items
&#39;hide_delay&#39; : 300,
&#39;css&#39; :
{
&#39;table&#39; : &#39;mtable&#39;,
&#39;outer&#39; : &#39;&#39;,
&#39;inner&#39; : &#39;&#39;
}
},
// Level 2 block configuration
{
&#39;block_top&#39; : 0,
&#39;block_left&#39; : 160
}
//Subling level configurations are inherited from level 2
]

var MENU_ITEMS = [";

CreateHoverMenu();

echo "];

new menu (MENU_ITEMS, MENU_POS);

//--&#62;
</script>";
}
else
{
// use normal category menu
for(&#036;i = 0; &#036;i < &#036;categoryrows; &#036;i++)
{
echo &#39;<tr height="21px"><td width="100%" align="right" valign="middle" class="navigation">&#39;.&#036;categoryname[&#036;i].&#39; (&#39;.&#036;categorylink[&#036;i].&#39;)skins/affinity/images/a_navigation_bullet.jpg</td></tr>&#39;;
}
}

thomas
09-20-2005, 08:53 AM
YES&#33;

This is the place&#33;

Im sure someone can help you...just be patient&#33;

kaweb
09-24-2005, 11:15 PM
Hmmm....

I have given this a lot of time, but still no replies.

I hoped that this would give me some answers, but no.