0

Possible Duplicate:
Make outer div be automaticly the same height as its floating content

Hi I have code like this

<div id="wrapper">
    <div id='float-left-1'>...</div>
    <div id='float-left-2'>...</div>
    <div id='float-left-3'>...</div>
</div>

When I run this page it happens that wrapper is not around divs inside... How can I solve this? Float divs are over the wrapper...

Thanks for answer in advance!

Community
  • 1
  • 1
M.V.
  • 1,662
  • 8
  • 32
  • 55
  • Thanks for down-vote but it didn't work for me... Now it works! – M.V. Feb 29 '12 at 11:20
  • What didn't work for you. The linked post? If it didn't work for you why did you came up with the exact same solution? – PeeHaa Feb 29 '12 at 11:21
  • I don't have specific height but it vary. Although whatever... The problem is solved and it might help someone. The trick was in position:relative and the solution suggested in upper link. – M.V. Feb 29 '12 at 11:45

1 Answers1

0

I solved the problem...

All the float divs were added:

position: relative;
float: left;

at the end I have added:

<div style="clear:both"></div>

and now it works perfect... it did the trick!

PeeHaa
  • 71,436
  • 58
  • 190
  • 262
M.V.
  • 1,662
  • 8
  • 32
  • 55