#irreligious-game, .resource-type-container { clear: all; overflow: auto; } div.resource { float: left; border: 2px solid black; margin-right: 5px; margin-bottom: 5px; padding: 5px 10px; }