28 Sep 2007 at 11:19 #1 anotherF anotherF Associate Joined 5 Feb 2006 Posts 129 Location Birmingham When i float two divs to the right they appear alongside each other, i want them to appear under each other, is this possible!
When i float two divs to the right they appear alongside each other, i want them to appear under each other, is this possible!
28 Sep 2007 at 11:32 #2 Dj_Jestar Dj_Jestar Caporegime Joined 18 Oct 2002 Posts 29,493 Location Back in East London Code: <div style="float:right"></div> <br style="clear:both"/> <div style="float:right"></div>
28 Sep 2007 at 11:44 #3 huppy huppy Associate Joined 6 Jul 2004 Posts 465 There shouldn't be need for the <br />, just add clear:right or clear:both to the second floated div.
There shouldn't be need for the <br />, just add clear:right or clear:both to the second floated div.
28 Sep 2007 at 11:49 #4 anotherF anotherF Associate OP Joined 5 Feb 2006 Posts 129 Location Birmingham Exellent problem solved! Thanks
28 Sep 2007 at 16:03 #5 Dj_Jestar Dj_Jestar Caporegime Joined 18 Oct 2002 Posts 29,493 Location Back in East London huppy said: There shouldn't be need for the <br />, just add clear:right or clear:both to the second floated div. Click to expand... For unknown reasons that never works for me.
huppy said: There shouldn't be need for the <br />, just add clear:right or clear:both to the second floated div. Click to expand... For unknown reasons that never works for me.
28 Sep 2007 at 16:27 #6 gord gord Soldato Joined 18 Oct 2003 Posts 19,415 Location Midlands i just use a clearance class or similar in the css
28 Sep 2007 at 16:46 #7 Sic Sic Soldato Joined 9 Nov 2004 Posts 15,365 Location SO16 same here: Code: .clear_both { clear: both; } .clear_left { clear: left; } .clear_right { clear: right; }
same here: Code: .clear_both { clear: both; } .clear_left { clear: left; } .clear_right { clear: right; }
28 Sep 2007 at 16:54 #8 huppy huppy Associate Joined 6 Jul 2004 Posts 465 Dj_Jestar said: For unknown reasons that never works for me. Click to expand... It should work for block level elements
Dj_Jestar said: For unknown reasons that never works for me. Click to expand... It should work for block level elements