Re: Reducing the header size of collection list for mobile in Dawn theme

Reducing the header size of collection list for mobile in Dawn theme

lushpupco
Tourist
12 0 5

I've been able to increase the columns on mobile from 2 to 6 but now my header font is too large. I've tried searching through other posts but can't seem to locate code that will help to reduce. I'd like the text to across no more than two rows per column.

 

www.lushpupco.com

 

Thanks!

 

lushpupco_0-1727939409595.png

 

 

Replies 7 (7)

parth_ghelani
Shopify Partner
259 38 36

Hello @lushpupco 

You just need to follow below steps, to show the collection header in 2 rows instead of 3.

1. Go to admin > Online store > edit code.

2. In code directory, find the file named "component-card.css" file and open it.

3. Copy below mentioned code and paste it at the end of above suggested file.

@media (max-width: 749px) {
  .collection-list-wrapper .collection-card-wrapper .card__heading {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
}

4. Don't forget to save the file after making changes.

Hope this code works for your issue.

Was your question answered? Mark it as an Accepted Solution.
If you need further assistance to optimize your store, please don't hesitate to reach out. I'm committed to providing you with my full support and ensuring that you get the most out of our collaboration.

Get in Touch: You can contact me directly at softkarts@gmail.com for any questions or concerns
lushpupco
Tourist
12 0 5

Thank you! Is it also possible to reduce the font size so the text is not truncated?

BSSCommerce-HDL
Shopify Partner
2305 834 905

Hi @lushpupco, I think it would look better like this

BSSCommerceHDL_0-1727942127275.png

 

Sale banner, pop ups: Customize your sale banner, pop-ups and create countdown bar to boost conversion rate.
Simicart: Transform your Shopify store into a stunning and fully functional mobile app with just a few simple steps.
Product Labels & Badges:
Get more sales with striking labels, badges, and banners from our 10,000+ available templates.

BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month now

lushpupco
Tourist
12 0 5

hello! i've made the changes to have 3 columns, now live. are you able to help with coding to correct the image sizes so they're all the same? ideally the size of the walking kit image. 

thanks!

lushpupco
Tourist
12 0 5

the third section will also need to be updated, apologies, i'm not sure how to differentiate the coding!

 

lushpupco_0-1727943763083.png

 

 

thirdly (and hopefully lastly), i'd like this section to be across 4 columns?

 

lushpupco_1-1727943785192.png

 

BSSCommerce-HDL
Shopify Partner
2305 834 905

@lushpupco, Pls add code in theme.liquid above </head>: 

<style>
@media only screen and (max-width: 767px) {
.section-template--22975037571359__collection_list_j6Wkr8-padding .slider-mobile-gutter .collection-list {
  grid-template-columns: repeat(4, 1fr) !important;
}
}
</style>

Hope this can help you,

If our suggestions are useful, please let us know by giving it a like or marking it as a solution. Thank you 😍

Sale banner, pop ups: Customize your sale banner, pop-ups and create countdown bar to boost conversion rate.
Simicart: Transform your Shopify store into a stunning and fully functional mobile app with just a few simple steps.
Product Labels & Badges:
Get more sales with striking labels, badges, and banners from our 10,000+ available templates.

BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month now

lushpupco
Tourist
12 0 5

Thank you @BSSCommerce-HDL ! This has solved point 2. Could you help with code for these two sections to make all images the same size?

lushpupco_0-1727998879683.png

 

lushpupco_1-1727998901368.png