views:

17

answers:

1

Its a bit of a tough one to explain really.

this is it:

<div id="inside-cntr">
<!--GAME CONTENT GOES HERE!-->
<div style="position:relative; margin:15px; margin-top:35px; margin-bottom:20px; padding:1px; width:200px; height:200px; display:inline-block; float:left; background-color:#333;"></div>
<div style="position:relative; margin:15px; margin-top:35px; margin-bottom:20px; padding:1px; width:200px; height:200px; display:inline-block; float:right; background-color:#333;"></div>

<!--GAME CONTENT GOES HERE!-->

 #inside-cntr { position:relative; width:760px; height:auto; min-height:50px; margin:0px; background-image:url(../images/global/main-content-inner.jpg); background-repeat:repeat-y; background-position:center; z-index:10; clear:both; }

What is happening is that the two div test blocks do not sit inside the expanding div container when both blocks have float attributes. Also, i'm not too sure why I have to put such large margins to position the div blocks too?

+1  A: 
#inside-cntr { overflow:hidden; zoom:1; }

Explanation: http://work.arounds.org/clearing-floats/

meder
Absolute Legend! Thank you!
Callum Johnson