View Full Version : HV Menu: Positioning in a centered table

08-21-2005, 06:42 PM
Hi there,

I know questions about HVMenu might not be supported, but I hope someone can help me nevertheless.

I searched the boards and saw someone posted that HVMenu can be placed in a table cell.

I am currently building my new website layout but ran into problems with the menu.

The problem is that my new layout is a centered table, and has no absolute position.
Unfortunately I can place the HVMenu only in absolute positions, but I need it to "follow" the table wherever it goes.

I read something about containers and divs in another thread about Top Navigational Bar III, but there was no real explanation, at least not understandable enough for me.

I am using the menu vertically, the centered layout-table is basically divided into two parts, a sidebar on the left and the main content.

The menu is supposed to be in the sidebar at the left ,besides the header in the main part. (menu unfolds over the header)

All I need is a way to position the menu in the sidebar at the left, without using absolute positions. (though absolute positions referring to the table sides and not to the browser window sides would be great as well)

Any help would be greatly appreciated. :o

08-21-2005, 07:33 PM
Hm, Thanks for the reply, but it didn't work :(

HVMenu is positioned through these variables in the *.js file:

var MenuTextCentered='center'; // Item text position 'left', 'center' or 'right'
var MenuCentered='center'; // Menu horizontal position 'left', 'center' or 'right'
var MenuVerticalCentered='static'; // Menu vertical position 'top', 'middle','bottom' or static
var ChildOverlap=.1; // horizontal overlap child/ parent
var ChildVerticalOverlap=.2; // vertical overlap child/ parent
var StartTop=92; // Menu offset x coordinate
var StartLeft=97; // Menu offset y coordinate

According to the install instructions you just have to place the script thingie under your "body"-tag then.

But then it's in an absolute position, caused by var StartTop and var StartLeft

ETA: There was a post by jscheuer1 before I replied again, where did that go????? :confused: :confused:

08-21-2005, 07:35 PM
From the configuration documentation (config.htm):

[for use in the exmplmenu_var.js]

Text string- Enables relative positioning of the menu.
1- In the HTML-file where the menu shows you need a named div:
<div id='MenuPos' style='position:relative'></div>
2- Set TargetLoc to 'MenuPos'
3 - Set MenuCentered to 'left', MenuVerticalCentered to 'top' and StartTop and StartLeft to 0
4 - StartTop, StartLeft and the Menu center variables can still be used to get an offset from the <div>.

Remarks: the different ways browsers interpret the pageX and pageY offset makes this feature difficult. I got the best results by putting the div inside a table, give the div the same dimensions as the first level menu, put an transparent image inside the div with again the same dimensions as the first level menu
<div id='MenuPos' style='position:relative; width:102; height:102;'><img src='transparent.gif' width='102' height='102'></div>

08-21-2005, 07:59 PM
Great, now I can add another embarrassing experience to my list.

Sorry for posting, and thanks very much for your help. :)

*makes note to read readmes twice before asking*