Search code examples
javascripthtmlz-indexpositioning

Positioning of an html element over a javascript one


this is the website I'm working on: http://labbrini.netsons.org and on its left side I have a div (#puntate) that should be on top of the javascript of the big lips logo (#logo) that shows up over everything. Of course I need the links of #puntate being clickable even when logo shows over it. z-index doesn't works for this. Can somebody help me with this positioning?


Solution

  • While inspecting your code in my browser, I saw that you were using px for z-index.

    Dont give any units for z-index

    In your CSS, replace,

    z-index: 900px;
    

    with

    z-index: 900;
    

    As, stated in the docs

    The z-index property specifies the z-order of an element and its descendants.

    And, order doesnt have a unit. Thus no need for any units. Any element with a higher z-index will be on top of other elements.