Homepage Heading Desktop vs. Mobile

Topic summary

A user seeks to prevent their homepage heading from being reformatted on mobile devices, where text appears to break differently than on desktop.

Solutions Provided:

  • Option 1 (Moeed): Add custom CSS code to the theme.liquid file, just above the </body> tag, to control mobile font sizing using media queries.

  • Option 2 (NovakNorth906): Use the theme customizer’s built-in custom CSS feature instead:

    1. Navigate to Online Store → Customize
    2. Select the relevant section
    3. Add CSS targeting mobile screens (max-width: 767px) to adjust h2 font-size (suggested: 25px)

Discussion Notes:

  • NovakNorth906 suggests their approach is preferable as it uses the section-level custom CSS settings rather than editing core theme files.
  • The user confirmed their site is live (not password-protected).
  • The conversation concludes with the user thanking contributors for the solutions.

Status: Resolved with multiple working approaches provided.

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

Is there any code I can use so my heading on my homepage doesn’t get reformatted on Mobile?

Desktop:

Mobile:

Hey @wymonster

Share your Store URL and Password if enabled.

Best Regards,

Moeed

Hi @wymonster ! There are a couple things that could help fix this. Could you please share your store URL and password if required?

Kind regards,

Mark

I am not willing to give someone access to the backend of my website

@wymonster Sorry for the misunderstanding, that is not what I was asking. Essentially what I am asking is if you could share a “preview” URL to view the frontend of your site. Sometimes stores that are still in development mode have a preview that is password restricted. This is completely separate from your back end.

Thank you for clarifying! And my website is live: www.wyldyears.com

Hey @wymonster

Follow these Steps:

  1. Go to Online Store

  2. Edit Code

  3. Find theme.liquid file

  4. Add the following code in the bottom of the file above tag


NOTE: Adjust this font size accordingly to however you like

RESULT:

If I managed to help you then, don’t forget to Like it and Mark it as Solution!

Best Regards,
Moeed

@Moeed Wouldn’t it be better to add via custom CSS section setting?

@wymonster Here is what you should do:

  1. Online store
  2. Find theme > customize
  3. Select that section
  4. Bottom of section settings add this in custom css
@media screen and (max-width: 767px) {
  h2 {
    font-size: 25px;
  }
}

See screenshot below:

If this helped please make sure to like it and mark it as solution

Kind regards,

Mark

Thank you!

1 Like