[SOLVED] Div overlay takes up full width issue

  • Hi

    I have a div, called #panel, that is overlayed on top of the krpano. I've set a width and height on #panel, but a big black background, which is the same height as the #panel div, stretches the with of the page.

    See the Div-over-pano.png attachment a screenshot of the problem

    Here is my html code

    Code
    <div id="panel">
        <p>Hello World</p>
    </div>

    and my CSS

    UPDATE:

    My div was pushing the pano down, hence the black background stretching the width of the screen.
    Here is my updated CSS code that fixed the problem

    Code
    #panel
    {
        background: #fff;
        padding: 5px;
        width: 250px;
        height: 250px;
        position: absolute;
        z-index: 1;
    }

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!