Fixed css typo and moved div within loop