You container div #right_b
is collapsing because its children are floating. You can fix this with the "Clear-Fix" technique. You may want to check out the following Stack Overflow post for a few solutions:
- Which method of ‘clearfix’ is best?
One popular solution is to add overflow: hidden
to your container div: #right_b
:
#right_b {
background:transparent url('img/right.png');
background-position: right top;
background-repeat: repeat-y;
overflow: hidden;
}
Another common one is to add a <div style="clear: both;"> </div>
before closing your container div:
<div id="first">
<div id="left_b">
<div id="right_b">
<div id="text">text 1</div>
<div id="text2">text 2</div>
<div style="clear: both;"> </div>
</div>
</div>
</div>