Forum Moderators: not2easy

Message Too Old, No Replies

Divs and nested floats

         

mcsilvio2

5:20 pm on Oct 5, 2007 (gmt 0)

10+ Year Member



hi all,
gotta tricky issue. any ideas would be greatly appreciated.

ive got a div of fixed with (its big). nested in that ive got a smaller div floated to the right (this div is taller than it is wide). so far this works fine.

the parent div was originally positioned relatively and in flow. and I had another div positioned right after it. because of the flow it worked great and always appeared right at the bottom of the big div, regardless of what content was in it.

today i had to change the positioning of the parent div to absolute. it solved many problems for me but created one. now the div i need after the big one doesnt know where it ends because its not in the flow anymore.

i still need the bottom div so what i did was place it after the content INSIDE the big div. this worked great. when i had lots of text in the big div, it wrapped nicely around the floated div, and below it shows the bottom div.

then my boss changed the text and now all of the text is shorter than the floated div on the right. because of this, the bottom div now overlaps the floated div.

i wish there was a way to keep the div after the text but have it only go so high as the floated div.

i can supply a url if it helps but i think its against the rules.

sorry for the length here.
marco.

mcsilvio2

5:24 pm on Oct 5, 2007 (gmt 0)

10+ Year Member



sok i got it. i had to float it as well. now its always sits nicely underneath the other floated div.

thanks anyways though. :D

marco.