Results 1 to 5 of 5
  1. #1
    5 Star Lounger
    Join Date
    Nov 2004
    Location
    Wilmington, North Carolina, USA
    Posts
    1,196
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help in placing floating menu (javascript/html)

    I've designed this site, and as you can see, when you open it, there is the collapsable menu at the very top. What I'd like to do is have the menu "spawn" (video-game term for where your character restarts after dying...sorry) next to the picture. Any tips?
    ____________________________
    Jeremy
    "If you spend more on coffee than on IT security, then you will be hacked. What's more, you deserve to be hacked." -Richard Clarke

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Help in placing floating menu (javascript/html

    I see what you have and I don't understand what you want to change. <img src=/S/sad.gif border=0 alt=sad width=15 height=15>

    I don't know whether you use Firefox, but in the Errors Console, there are a zillion of these:
    <hr>Security Error: Content at http://usmc2100.apg.army.mil/mos/1161/1161desc.html may not load or link to file:///W|/www/images/blank.gif.<hr>
    So there seems to be a bad URL somewhere.

  3. #3
    5 Star Lounger
    Join Date
    Nov 2004
    Location
    Wilmington, North Carolina, USA
    Posts
    1,196
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Help in placing floating menu (javascript/html

    I want the menu to start (basically) halfway down the page...sort of in a fixed location, instead of at the very top, as it does right now.
    ____________________________
    Jeremy
    "If you spend more on coffee than on IT security, then you will be hacked. What&#39;s more, you deserve to be hacked." -Richard Clarke

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Help in placing floating menu (javascript/html

    The table containing the menu has the style top:10px to position it initially, and the script function setSidebarTop() moves the menu to keep it 10px from the top inside of the window frame (see the line containing 10 + document.body.scrollTop). If you change those "10" values, the menu will appear lower.

  5. #5
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Help in placing floating menu (javascript/html

    Hi Jeremy

    I think I have this right as I took a local copy and everything has gone awry and looped!!!!

    try changing the values in

    function setSidebarTop() {

    var sidec = getObj('sidebar');
    sidec.style.top = 400 + document.body.scrollTop;
    setTimeout('setSidebarTop()', 10);
    }

    and the corresponding value in line 71:

    <table border="0" cellpadding="3" cellspacing="0" bgcolor="#cc0000" id="sidebar" style="border-top: 1px solid rgb(255, 255, 0); border-bottom: 1px solid rgb(255, 255, 0); position: absolute; z-index: 100; left: 0px; top: 400px; font-family: Verdana; height: 224px;" name="sidebar">

    Obviously change them to the value you want

    A small point though <img src=/S/whisper.gif border=0 alt=whisper width=29 height=17>This Dreamweaver template page isn't XHTML 1.0 valid anymore...I suggest you deaden the link to W3C <img src=/S/wink.gif border=0 alt=wink width=15 height=15>
    Jerry

Posting Permissions

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