moved css into index and updated foreach loop