Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jul 2005
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    menu offset problem

    Hi, i have a problem. I have 4 different sliding menus, located on top of eachother. Once the mouse enters a box, it tabs out, and once it leaves, it returns to its origional state. The problem is that I don't know how to subtract height from the offset margin. For example, the 2nd menu bar is tabbing out when the mouse enters the 1st bar, because it's height is set at 150px.

    what i have tried to do is something like this so that there would be 100px of nothing starting from the top of the frame...

    Code:
    top:'+((parseInt(slidemenu_top)-100px)+'px;
    Is this the incorrect way of doint this?

    Please let me know.

  • #2
    Senior Coder
    Join Date
    Mar 2005
    Location
    Portsmouth UK
    Posts
    4,529
    Thanks
    3
    Thanked 511 Times in 498 Posts
    top:'+((parseInt(slidemenu_top)-100px)+'px;
    difficult to answer without knowing what 'top:' and 'slidemenu_top' are

    if slidemenu_top' is say '200px' then parse float is appropiate


    if it is 200(digits) parse float is not reqd

    the +'px; should be +'px';

    I would not like to guess what top:' is but as it is a string? there will be a problem adding it to a number

  • #3
    New Coder
    Join Date
    Jul 2005
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    var slidemenu_width='175px'
    var slidemenu_reveal='32px'
    var slidemenu_top='125px'

    this is an example of the 2nd bar down.

    the 1st bar has var slidemenu_top='0px'


  •  

    Posting Permissions

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