Div beside fixed div

129 views Asked by At

Got a small problem. How do i make DIV2 appear beside the "rcontainer" in the following jsfiddle?

At the moment, the following code appears under the rcontainer showns as DIV2

http://jsfiddle.net/ce7st2ms/

<body>
<div id="rcontainer">
    <div id="accinfo" style="height:50px; overflow:hidden;">
        <span id="inneraccinfo">
            xxxx <br />
            xxxx
        </span>
    </div>
</div>
<div>div2 here</div>
</body>

body {
padding:0px;
margin:0px;
border:0px;
}
#rcontainer {
min-height: 1000px;
min-width: 12.54%;
background-color:grey;
margin:0px;
width: 100px;
}
#inneraccinfo {
font-family:my_fat_font;
color: white;
display: table-cell;
vertical-align: middle;
padding-left: 10px;
}
#accinfo {
position: fixed;
left: 10px;
top: 122px;
display: table;
}
1

There are 1 answers

0
Thomas Bormans On BEST ANSWER

Use float: left on both div's.

JSFiddle

CSS:

#rcontainer {
    min-height: 1000px;
    min-width: 12.54%;
    background-color:grey;
    margin:0px;
    width: 100px;
    float: left;
}

.div2 {
    float: left;
}