Reordered <div> and {% if... in case that's what's breaking the layout