I have created a page which has images for each category on my store (boxing, martial arts, yoga etc...) I need the images to be centered on the page and also move down onto different lines if the window is shrunk. I hope this makes sense...
As you can see from the green horizontal line, they images are not centered (i do not want them in a vertical line one above another, i like how they are set up now next to each other).
My code is:
<style><!--
p {
padding:10px;
}
.img_collection {
width:252px;
height:167px;
}
img:hover {
opacity: 0.5;
filter: alpha(opacity=50);
}
.center {
width:100%;
margin:auto;
border:1px solid green;
}
--></style>
<div class="center">
<p style="float: left; text-align: center;"><a href="http://theactivitymart.com/collections/boxing"><img class="img_collection" src="//cdn.shopify.com/s/files/1/1712/9905/files/Boxing.jpg?v=1491336153" alt="" /></a><br /><a href="http://theactivitymart.com/collections/boxing">Boxing</a></p>
<p style="float: left; text-align: center;"><a href="http://theactivitymart.com/collections/fitness-equipment"><img class="img_collection" src="//cdn.shopify.com/s/files/1/1712/9905/files/Fitness_Equipment.jpg?v=1491336105" alt="" /></a><br /><a href="http://theactivitymart.com/collections/fitness-equipment">Fitness Equipment</a></p>
<p style="float: left; text-align: center;"><a href="http://theactivitymart.com/collections/gymnastics"><img class="img_collection" src="//cdn.shopify.com/s/files/1/1712/9905/files/Gymnastics.jpg?v=1491336578" alt="" /></a><br /><a href="http://theactivitymart.com/collections/gymnastics">Gymnastics</a></p>
<p style="float: left; text-align: center;"><a href="http://theactivitymart.com/collections/martial-arts"><img class="img_collection" src="//cdn.shopify.com/s/files/1/1712/9905/files/Martial_Arts.jpg?v=1491336138" alt="" /></a><br /><a href="http://theactivitymart.com/collections/martial-arts">Martial Arts</a></p>
<p style="float: left; text-align: center;"><a href="http://theactivitymart.com/collections/weight-lifting"><img class="img_collection" src="//cdn.shopify.com/s/files/1/1712/9905/files/Weight_Lifting.jpg?v=1491336597" alt="" /></a><br /><a href="http://theactivitymart.com/collections/weight-lifting">Weight Lifting</a></p>
<p style="float: left; text-align: center;"><a href="http://theactivitymart.com/collections/yoga"><img class="img_collection" src="//cdn.shopify.com/s/files/1/1712/9905/files/Yoga1.jpg?v=1491336562" alt="" /></a><br /><a href="http://theactivitymart.com/collections/yoga">Yoga</a></p>
</div>