DHTML Question?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MPS
    Senior Member
    • Aug 2005
    • 417
    • 4.0.0

    DHTML Question?

    function init()
    {
    menus[0] = new menu(125, "vertical", 10, 10, -1, -1, "white", "black", "MS Sans Serif", 9, "bold", "bold", "black", "white", 2, "black", 2, "v", false, true, true, false, 0, true, 5, 5, "gray");
    menus[0].addItem("#", "NEWWIN", 100, "center", "Home", 0);
    menus[0].addItem("#", 100, "center", "Products", 1);
    menus[0].addItem("#", 100, "center", "Services", 2);
    menus[0].addItem("#", 100, "center", "Contact Us", 0);
    menus[0].addItem("#", 100, "center", "Links", 0);
    }

    This parameter controls the set size of the menu. If the menu is horizontal, it refers to the height of the menu. If the menu is vertical, then it refers to the width of the menu. The number is measured in pixels. (125)


    How can I change the 125 setting so I can center my DHTML menu? Or how do I center it at all?

    Thanks,

    Patrick
  • diades
    Senior Member
    • Jul 2002
    • 291
    • 3.5.x

    #2
    Hi

    This is one method:
    Code:
    [COLOR="Red"]var margin = (Math.round((document.body.clientWidth-125)/2)[/COLOR]
    menus[0] = new menu(125, "vertical", 10, 10, -1, -1, "white", "black", "MS Sans Serif",
                         9, "bold", "bold", "black", "white", 2, "black", 2, "v", false, 
                         true, true, false, 0, true, 5, 5, "gray");
    although how you get that to react with the menu I have no idea as I do not know the script that builds the menu.
    Last edited by diades; Thu 6 Jul '06, 1:40pm.
    Later
    Keith

    Webxpertz Community for Webmasters & Developers

    Comment

    • fahlsen
      New Member
      • Jun 2006
      • 5
      • 3.5.x

      #3
      I also got a question about the DHTML menues. Where can i change the position of them? Ive added a custom header over the forum and now all my menues are shoving up at the wrong position.

      Comment

      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
      Working...