Positioning divs

Posted by Thomas on Stack Overflow See other posts from Stack Overflow or by Thomas
Published on 2010-04-30T06:39:24Z Indexed on 2010/04/30 6:57 UTC
Read the original article Hit count: 268

Filed under:
|
|
|
|

Hi all,

I'm working with the Jquery accordion. So my code goes like this:

<h3><a href="#">Test </a></h3>
<div class="accordion" style="background-color:yellow;">
   <div class="test_1">
      my first dynamic content div
   </div>
   <div class="test_2">
      my second dynamic content div
   </div>
</div>

So you see the H3 that's the 'accordian', if i click on that the div accordion opens with inside 2 seperate divs. That all works but the positioning of my 2 divs inside the accordion div fails. I should like to get them UNDER eachother, but both divs got generated dynamically what means that i don't know the size of the first div (test_1) so i can't position on pixels. I already tried with some br tags etc but nothing seems to work. Is there a way to do this in css maybe with float or something or should it be done inside the html ? ANy other ideas?

Regards,

T

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about jquery-ui