How can I adjust text and image alignment in my collection pages?

Solved

How can I adjust text and image alignment in my collection pages?

sparrowandfox
New Member
6 0 0

Hi There, 

Total coding newbie here..

I am trying to either centre the text, table and heading in my collection pages or stretch to fit the same area as the photo/products as seen in the below photos.. 

Dawn

5.0.0

Design and support by Shopify

Screenshot (2).pngScreenshot (1).png

 

And Secondly - if i want to show the collection image (which in certain collections i would love to do) it goes abnormally large as you can see below. is there a way to change it in shopify or is it a matter of getting the correct proportions before uploading

 

Screenshot (4).png

 

Thanks in advance,

Lauren

Accepted Solution (1)
WoodyDev
Shopify Partner
578 115 193

This is an accepted solution.

Awesome!

 

For the alignment, add this to the bottom of your component-collection-here.css file:

 

.collection-hero__title+.collection-hero__description {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

table {
    margin: 0 auto !important;
}

h1.collection-hero__title {
    text-align: center;
}

 

And to make the image fit, add this to the bottom of your base.css file:

 

.media>img {
    object-fit: fill !important;
}
Woody, 29, Stafford, UK | If I helped you out, mark it as the solution and drop me a thumbs up! | This is just a hobby for me, not my full-time job, so tips are greatly appreciated! paypal.me/woodybruh | Developer for AimShop.com | Owner of WoodyDevelopments | Try the best Shopify page builder

View solution in original post

Replies 6 (6)

WoodyDev
Shopify Partner
578 115 193

Hi and welcome!

 

Could you provide the URL to these pages on your store and I will take a look for you 🙂

Woody, 29, Stafford, UK | If I helped you out, mark it as the solution and drop me a thumbs up! | This is just a hobby for me, not my full-time job, so tips are greatly appreciated! paypal.me/woodybruh | Developer for AimShop.com | Owner of WoodyDevelopments | Try the best Shopify page builder
sparrowandfox
New Member
6 0 0

Hi Woody!

This is with the show collection image selected

https://www.sparrowandfox.com.au/collections/green-aventurine

And this is standard

https://www.sparrowandfox.com.au/collections/amazonite

Thanks!

Lauren

WoodyDev
Shopify Partner
578 115 193

This is an accepted solution.

Awesome!

 

For the alignment, add this to the bottom of your component-collection-here.css file:

 

.collection-hero__title+.collection-hero__description {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

table {
    margin: 0 auto !important;
}

h1.collection-hero__title {
    text-align: center;
}

 

And to make the image fit, add this to the bottom of your base.css file:

 

.media>img {
    object-fit: fill !important;
}
Woody, 29, Stafford, UK | If I helped you out, mark it as the solution and drop me a thumbs up! | This is just a hobby for me, not my full-time job, so tips are greatly appreciated! paypal.me/woodybruh | Developer for AimShop.com | Owner of WoodyDevelopments | Try the best Shopify page builder
sparrowandfox
New Member
6 0 0

By Jove you have done it!

A king amongst men... fan-bloody-tabulous!

Thanks so much for your help..

Lauren

WoodyDev
Shopify Partner
578 115 193

You're very welcome!

 

If you could spend a moment to read through my signature below, I would highly appreciate it ❤️

Woody, 29, Stafford, UK | If I helped you out, mark it as the solution and drop me a thumbs up! | This is just a hobby for me, not my full-time job, so tips are greatly appreciated! paypal.me/woodybruh | Developer for AimShop.com | Owner of WoodyDevelopments | Try the best Shopify page builder

DelightCart
Shopify Partner
1257 83 157

@sparrowandfox Can you please send me store url?

Delight Cart - It's time to turn your visitors into loyal shoppers! 

Delight Loyalty - Increase repeat sales quickly and build lifelong customers loyalty.