CSS: right wrapper dropping off the end of the page

Posted by user310606 on Stack Overflow See other posts from Stack Overflow or by user310606
Published on 2010-06-16T06:39:19Z Indexed on 2010/06/16 6:42 UTC
Read the original article Hit count: 159

Filed under:

I have an issue with a site I am working on where the right wrapper keeps dropping down below the site. Obviously I want it to stay on the right hand side.

I've coded up a test case which shows my issue (I think) and I'm wondering if there is a better way to do things.

The website url is http://www.musicworkshop.co.nz/

Below is the test case which (I think) is the cause of my issue, however it may not be. The pink box drops down if it does not fit within the page width.

Is there a better way to do this?

John

<html>
    <head>
        <title> Test page </title>
        <link rel="stylesheet" href="test.css" type="text/css" />
    </head>
    <body>
        <div id="superbox">
            <div id="box1">
            </div>
            <div id="box2">
            </div>
            <div id="box3">
            </div>
            <div id="box4">
            </div>
            <div id="box5">
            </div>
            <div id="box6">
            </div>
        </div>
    </body>
</html>

#outsidebox{
    width: 100%;
}

#superbox{
    width: 1000px;
    height: 100px;
    margin: 0 auto;
}

#box1{
    height: 100px;
    width: 200px;
    background: red;
    float: left;
}

#box2{
    height: 100px;
    width: 200px;
    background: yellow;
    float: left;
}

#box3{
    height: 100px;
    width: 200px;
    background: blue;
    float: left;
}

#box4{
    height: 100px;
    width: 200px;
    background: green;
    float: left;
}

#box5{
    height: 100px;
    width: 200px;
    background: grey;
    float: left;
}

#box6{
    height: 100px;
    width: 200px;
    background: pink;
    float: left;
}

© Stack Overflow or respective owner

Related posts about css