How can I reduce the line height on mobile for my about us page?

Topic summary

A user seeks to reduce line height by 50% on their About Us page, but only for mobile devices (desktop display is satisfactory).

Two solutions were provided:

  1. JavaScript approach: Add custom code to the theme.liquid file, placed above the closing </body> tag. This method uses media queries to target mobile screens.

  2. CSS approach: Insert CSS code into the theme.css file using a media query (@media (max-width: 768px)) to specifically adjust line-height: 1.6 for banner text elements on mobile devices.

Both solutions involve editing theme files through Shopify Admin → Online Store → Themes → Edit Code. The discussion remains open with no confirmation of which solution was implemented or whether the issue was resolved.

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

Hi there,

For our mobile about us page I would like to decrease the line height by 50% (desktop looks fine so only for mobile).

Website

Password: skoffi

Thanks!

1 Like

Hey @INFRA

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


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

Best Regards,
Moeed

1 Like

Hello @INFRA

  1. In your Shopify Admin go to online store > themes > actions > edit code
  2. Find Asset > theme.css and paste this at the bottom of the file:
@media (max-width: 768px) {
.banner__text.rte.body p {
  line-height: 1.6;
}
}