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

Topic summary

A user is customizing their Shopify Dawn theme’s collection list for mobile, having successfully increased columns from 2 to 6 but encountering display issues.

Initial Problem & Solution:

  • Header font became too large after column adjustment
  • A contributor provided CSS code for component-card.css to limit collection headers to 2 rows instead of 3, preventing text truncation

Ongoing Customization Requests:

  • User adjusted to 3 columns and needs help standardizing image sizes across collection items
  • Specifically wants to correct the “walking kit” image size to match others
  • Requests assistance with a third section that should display 4 columns across

Progress Made:

  • BSSCommerce-HDL provided custom CSS code to be added in theme.liquid above </head>, which successfully resolved one sizing issue
  • User confirms this solved “point 2” but still needs help with two remaining sections to achieve uniform image dimensions

The discussion includes multiple screenshots showing the layout issues and desired outcomes. The conversation remains active with the user seeking additional CSS solutions for image standardization.

Summarized with AI on November 5. AI used: claude-sonnet-4-5-20250929.

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!

1 Like

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;
  }
}
  1. Don’t forget to save the file after making changes.

Hope this code works for your issue.

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

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

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!

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

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

1 Like

@lushpupco , Pls add code in theme.liquid above :


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 :heart_eyes:

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?