1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Help with DIV layer menu position when centered

Discussion in 'CSS' started by imanta, Jul 11, 2005.

  1. #1
    I have a menu/submenu combo that uses DIV layers, JS, and CSS that workd great currently. The problem I have is that it was designed in a way where everything is absolute. Code looks like this:

    <div id="platform_menu" style="position:absolute; left:10px; top:82; width:108; height:17; z-index:3; visibility: visible;">
    Content
    </div>
    Code (markup):
    Then when the person mouseovers the content in the first div it triggers a sub layer which appears at the time same position:

    <div id="platform_submenu" style="position:absolute; left:10px; top:99; width:108; height:108; z-index:21; visibility: hidden;"> 
    Submenu
    </div>
    Code (markup):
    The question is, how do I make this so it can be centered on a screen? Keep in mind I have multiple _menus and submenus so each submeny would have to know the location of their parent.

    Thanks for the help!
     
    imanta, Jul 11, 2005 IP
  2. CompressedAir

    CompressedAir Peon

    Messages:
    56
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    This example might be helpful.
     
    CompressedAir, Jul 11, 2005 IP