SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Evangelist runeveryday's Avatar
    Join Date
    Jul 2009
    Posts
    437
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    position:absolute and z-index make the a link can't click?

    http://down123.xxmn.com/wemade/

    the navigation of all the links are can't click which at the center of the page, the position:absolute and z-index caused it. if i don't delete the z-index. is there a way to correct it?

    if have to remove the z-index in the #menu and that will solve the issue but i want the #top lay upon the menu lay,how should i do? thank you

  2. #2
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,118
    Mentioned
    28 Post(s)
    Tagged
    2 Thread(s)
    Hello,

    It's best to avoid absolute positioning unless there's a specific need for it.
    If you remove position: absolute; and add margin-top: 44px; to the menu it will appear correctly.

    Or if you want to use absolute positioning, you can just add position: relative; and a higher z-index to #top so that it is above menu.

  3. #3
    SitePoint Enthusiast
    Join Date
    Nov 2012
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by markbrown4 View Post
    Hello,

    It's best to avoid absolute positioning unless there's a specific need for it.
    If you remove position: absolute; and add margin-top: 44px; to the menu it will appear correctly.

    Or if you want to use absolute positioning, you can just add position: relative; and a higher z-index to #top so that it is above menu.
    this.

    position absolute should only be used when you really need it, like for a dropdown menu.

  4. #4
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,283
    Mentioned
    51 Post(s)
    Tagged
    2 Thread(s)
    except when you're andy clarke


Bookmarks

Posting Permissions

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