i have this: http://jsfiddle.net/uAQ8B/5/
This list should have all the objects on the left and every parent on the right. It works fine unless the parent is empty, like in this case where object 1 has a parent but object2-5 don’t.
How can i solve this?
As mentioned by @Pavan, you need to clear your left floats, otherwise the elements will just line up.
You can do this by adding
clear: both(or justclear: leftsince you are only floating elementsleft) to your.Discussioniclass:See this CSS tricks article about using floats: All About Floats