Results 1 to 4 of 4

Thread: HV Menu: Positioning in a centered table

  1. #1
    Join Date
    Aug 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default HV Menu: Positioning in a centered table

    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.

  2. #2
    Join Date
    Aug 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hm, Thanks for the reply, but it didn't work

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

    Code:
    	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?????

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    From the configuration documentation (config.htm):

    [for use in the exmplmenu_var.js]

    TargetLoc
    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
    <table>
    <tr><td>
    <div id='MenuPos' style='position:relative; width:102; height:102;'><img src='transparent.gif' width='102' height='102'></div>
    </td></tr>
    </table>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  4. #4
    Join Date
    Aug 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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*

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •