Separate heading sizes for desktop and mobile for 'image with text' section

Separate heading sizes for desktop and mobile for 'image with text' section

visualess
Excursionist
42 0 11

Hi,

 

I am trying to make the heading in the image with text section smaller so it doesn't get cut off, but I want to keep it the size it currently is on desktop. This is the code I am currently using in base.css but the mobile heading size doesn't seem to be changing. 

 

Can anybody help?

 

TIA!

 

/* IMAGE WITH TEXT SIZE mobile */
@media all and (min-width: 750px) {
.image-with-text__heading {
font-size: 14px;
}
}

/* IMAGE WITH TEXT SIZE desktop */
.image-with-text__heading {
font-size: 28px;
}
}

 

Screenshot 2024-09-21 at 19.05.04.png

Screenshot 2024-09-21 at 19.05.12.png

  

Replies 3 (3)

devcoders
Shopify Partner
273 43 65

Hi @visualess 

- Go to Online Store -> Theme -> Edit code.
- Find the file assets/base.css and paste the code below at the bottom of the file.

 

/* IMAGE WITH TEXT SIZE - mobile */
@media all and (max-width: 750px) {
  .image-with-text__heading {
    font-size: 14px;
  }
}
/* IMAGE WITH TEXT SIZE - desktop */
.image-with-text__heading {
  font-size: 28px;
}


 

Shopify Developer: Helping eCommerce Stores
If you need assistance with your store, feel free to contact us at [email protected].
If my assistance was helpful, please consider liking and accepting the solution. Thank you!

PageFly-Richard
Shopify Partner
4668 1069 1726

This is Richard from PageFly - Shopify Page Builder App

 

Hi @visualess  Please add code here to fix it:

Step 1: Online Stores > Themes > Edit code

Step 2: Choose file theme.liquid
Step 3: Add code above the tag </body>

 

@media all and (max-width: 767px) {
  .image-with-text__heading {
    font-size: 14px !important;
  }
}

.image-with-text__heading {
  font-size: 28px;
}

 

Hope my solution will help you resolve the issue.

 

Best regards,

Richard | PageFly

Please let me know if it works by giving it a Like or marking it as a solution!


➜ Optimize your Shopify store with PageFly Page Builder (Free plan available) 


All features are available from Free plan. Live Chat Support is available 24/7.

Made4uo-Ribe
Shopify Partner
8280 1987 2439

Hi @visualess 

Check this one. 

 

/* IMAGE WITH TEXT SIZE mobile */
@media all and (max-width: 749px) {
    .image-with-text__heading {
        font-size: 14px;
    }
}

/* IMAGE WITH TEXT SIZE desktop */
.image-with-text__heading {
    font-size: 28px;
}

 

And save. 

 

 

Please don't forget to Like and Mark Solution to the post that helped you. Thanks!

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free.
Need THEME UPDATES but has custom codes? No worries, contact us for affordable price.