Help on the z-index

Asked

Viewed 172 times

-1

Goodnight,

I’m developing a website but I’m tired of trying and nothing, the point is:

  • I have a contact box fixed on the right side but does not appear, so I read have to define the z-index, I adapted a script I bought on themeforest but it does not appear on the site.

www.agemper.en/new/index.html

Default Basic Script Code

#slideit {
    z-index:999999; /* Keep the item above all other elements on the page */
    position:fixed;
    width: auto; /* Width of the wrapper of the section. Adjust this value if you want wider elements */
    height: 100%;
    top: 0; /* Vertical position of the elements */
    right: 0; /* Horizontal position of the elements */
}

Hugs

  • 1

    put some code... pq so n to solve, unless you forgot to put position: Absolute; where you have z-index

  • 1

    Put the html and css of the box that does not appear in the question

  • place the html, and css of div pai tbm

  • The z-index is OK, the problem is that it is at zero width (you defined it as "auto", and in this context it is not serving for anything). This type of problem is easily visualized by the browser inspector. It is suggested that when asking questions, provide at least one [mcve] in the post. In many cases, by making the example trying to reproduce the problem, you already find the error.

1 answer

0

If ta fixed it cannot be proportional or automatic the value of width or height, because it will not be based on anything to be auto or with percentage. Change the value to px, example:

 #slideit {
    z-index:999999;
    position:fixed;
    width: auto; 
    height: 100%;
    top: 0; /* Vertical position of the elements */
    right: 0; /* Horizontal position of the elements */
}

Another detail, I don’t know if it’s like that or behavior, but I think (I just think) that Oce wants it in the footer, so put it as bottom:0, but if it’s to be at the top of the page ta right. One more detail, to 'see' him, put a background in the div, preferably with color to give contrast until you can put where you want, this way would be:

#slideit {
        z-index:999999;
        position:fixed;
        width: 200px; 
        height: 100px;
        bottom: 0; 
        right: 0; 
        background: #000;
    }
  • Solved. Thank you very much

Browser other questions tagged

You are not signed in. Login or sign up in order to post.