I've got two spans in a div. I want to align them next to each other. I'm doing this by floating them both left and right. The problem is that these spans have variable heights (they slide down when you click for 'more options'). So when their heights are changed during runtime (by sliding down), they won't push down the elements under them. If there's a way to align them without floating them, that would work.
+2
A:
Maybe an element with "clear:both" after those spans will solve your problem?
Pomyk
2009-09-07 20:33:35
You mean float one span either left or right with clear:both, leave the other as is?
gAMBOOKa
2009-09-07 20:34:33
Got it... this works perfectly!
gAMBOOKa
2009-09-07 20:38:58
+1
A:
Put overflow:auto
or overflow:hidden
on your div. This will force the div to size to the floating contents inside.
Joel Potter
2009-09-07 20:37:34