Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery sortable not working with floating items

I'm trying to move one list item from one side to another. However, it doesn't seem to work. I can move the list items from left to right, but not the other way around. The left side has a float: left in the CSS filesheet. If i remove this, everything seems to work. How can i fix this?

Anyone?

like image 463
Dexty Avatar asked Dec 01 '22 08:12

Dexty


1 Answers

The problem only partially has to do with your CSS. When you float:left the UL, it doesn't render as a block. The quick fix is to use a standard 'clearfix' paradigm:

#newsLayout ul {display:block;overflow:hidden}
like image 88
John Green Avatar answered Dec 23 '22 17:12

John Green