As was foretold, we've added advertisements to the forums! If you have questions, or if you encounter any bugs, please visit this thread: https://forums.penny-arcade.com/discussion/240191/forum-advertisement-faq-and-reports-thread/
Options

[solved] Positioning a javascipt menu

ShurakaiShurakai Registered User regular
edited November 2008 in Help / Advice Forum
Edit: Pretty much solved. Thanks.


So my sister wanted me to help her be Webmaster of a local dog club, and I said yes.

Thier old webmaster basically just knew how to do basic html and import some fancy scripts here and there. One of the only things I liked about the old design was that it has a fancy javascript menu. Now, I'm more of a soft and fuzzy graphics kind of guy than a code kind of guy, so I am using Frontpage for the new design. Its not the best ever but I am trying to get it off the ground.

One thing about Frontpage however is that you can't see or positing anything javascript related (or at least I haven't found out how) without going into the code.

Here is my test site, just so you know whats going on. If you dare look at the old site, you can click on any number of links on the page and witness the horror.

Edit: for anonymity reasons I've edited out the link

As you can see the menu is not where I would like it to be.

Here is the section of code which places the menu on the site:

In the head:
<script language="JavaScript" src="menu.js"></script>
    <script language="JavaScript" src="menu_items.js"></script>
    <script language="JavaScript" src="menu_tpl.js"></script>
    <link rel="stylesheet" href="menu.css">

In the body:
<script language="JavaScript">
    new menu (MENU_ITEMS, MENU_TPL);
</script>


I would like the menu to be directly under the HDD logo and centered, basically. I haven't yet figured out how and I figured I should ask here for tips.

Shurakai on

Posts

  • Options
    MagicPrimeMagicPrime FiresideWizard Registered User regular
    edited November 2008
    You should be able to place the java script inside a <div> and position it with a normal css sheet.

    MagicPrime on
    BNet • magicprime#1430 | PSN/Steam • MagicPrime | Origin • FireSideWizard
    Critical Failures - Havenhold CampaignAugust St. Cloud (Human Ranger)
  • Options
    wasted pixelswasted pixels Registered User regular
    edited November 2008
    Nope, it's going to be more complicated than that.

    OP, the specific script you're using requires you to specify the X and Y coordinates of your menu in the js file (open it in notepad, you're looking for "'left': 99, 'top': 0,") and the problem with this is that the website is "centered", and thus the logo you want to put the menu below will be in different positions at different resolutions.

    My suggestion would be to either implement a more practical, easy-to-install menu (try Suckerfish), or if you're determined to stick with that one, making the design flush left instead of centering it.

    wasted pixels on
  • Options
    ShurakaiShurakai Registered User regular
    edited November 2008
    Thanks, I'll look into suckerfish. I'll consider this thread solved for now.

    Shurakai on
Sign In or Register to comment.