WordPress.org

Ready to get started?Download WordPress

Forums

z-index/css problem (2 posts)

  1. simuuu
    Member
    Posted 6 years ago #

    Hi !

    I have a problem i can't solve by myself (i tried, i swear ).

    The z-index seems to change between the main blog page and a single post page...

    The header is behind the background, the z-index of the sidebars seems blocked....
    i don't get it. I know my css file is active because all the background images are visible.

    Thanks for any help !

  2. Anonymous
    Unregistered
    Posted 5 years ago #

    You have to make the same div position:absolute; that you do z-index: 1; to (for e.g.) and another div has to have z-index: 2; and position: absolute; so it goes like this:

    edit /public_html/wp-content/themes/your_theme/page.php

    <head> <!--or your css file-->
    <style>
    #1 {position: absolute;
    width: 100%;
    height: 40px;
    z-index:1;}

    #2 {position: absolute;
    z-index:2;}
    width: 100px;
    height: 100%; /*(or something else - like 1000px )*/
    </style>
    </head>

    <body>
    <div id=1>
    some text, header, etc.
    </div>
    <div id=2>
    other text
    <img src="(/images/some_photo.jpg)">
    </div>

    </body>

Topic Closed

This topic has been closed to new replies.

About this Topic