How to change font size for image text title on mobile phones

Solved

How to change font size for image text title on mobile phones

Allen6224
Excursionist
29 0 5

Hi,

I'm trying to figure how to modify the code below to not change the original font size for the image text "The Buyer's Handbook". The code does what i want but it changes the font size for image text title. See font size title before and after.


Code:

<style>
@media screen and (max-width: 767px) {
/* Adjusts the font size for all H2 elements with class 'collection-list-title' */
h2.collection-list-title {
font-size: 24px !important;
}

/* Adjust font size for other potential collection titles */
.collection-title, .collection-heading,h2, .collection-list h2 {
font-size: 24px !important; /* Adjust font size for all potential selectors */
}
}
</style>

Original Font Size:

Allen6224_1-1725391917090.png

 

 

Title After Code:

Allen6224_2-1725391947663.png

 


Accepted Solutions (2)

Tech_Coding
Shopify Partner
123 37 36

This is an accepted solution.

Hello @Allen6224 

You can add code by following these steps

1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.liquid file

3. Paste the below code before </body> on theme.liquid
<style>
@media screen and (max-width: 767px){
    h2.image-with-text__heading.h1 {
        font-size: 23px !important;
    }
    .image-with-text__content {
       padding: 2rem !important;
    }
}
</style>

Tech_Coding_0-1725392611016.png

my reply helpful? Click Like to let me know!
your question answered? Mark it as an Accepted Solution.

my reply helpful? Click Like to let me know!
your question answered? Mark it as an Accepted Solution.
Shopify UI Developer
Your Coffee Tips adds a little sweetness to my day.

View solution in original post

Made4uo-Ribe
Shopify Partner
7683 1850 2266

This is an accepted solution.

Hi @Allen6224 

Check this one. 

From you Admin page, go to Online Store > Themes

Select the theme you want to edit

Under the Asset folder, open the main.css(base.css, style.css or theme.css)

Then place the code below at the very bottom of the file.

 

@media only screen and (max-width: 749px){
.image-with-text__content.image-with-text__content--adapt h2 {
    font-size: 30px !important;
}
}

 

And Save. 

Result:

Made4uoRibe_0-1725393584357.png

 

 

 

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.

View solution in original post

Replies 2 (2)

Tech_Coding
Shopify Partner
123 37 36

This is an accepted solution.

Hello @Allen6224 

You can add code by following these steps

1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.liquid file

3. Paste the below code before </body> on theme.liquid
<style>
@media screen and (max-width: 767px){
    h2.image-with-text__heading.h1 {
        font-size: 23px !important;
    }
    .image-with-text__content {
       padding: 2rem !important;
    }
}
</style>

Tech_Coding_0-1725392611016.png

my reply helpful? Click Like to let me know!
your question answered? Mark it as an Accepted Solution.

my reply helpful? Click Like to let me know!
your question answered? Mark it as an Accepted Solution.
Shopify UI Developer
Your Coffee Tips adds a little sweetness to my day.

Made4uo-Ribe
Shopify Partner
7683 1850 2266

This is an accepted solution.

Hi @Allen6224 

Check this one. 

From you Admin page, go to Online Store > Themes

Select the theme you want to edit

Under the Asset folder, open the main.css(base.css, style.css or theme.css)

Then place the code below at the very bottom of the file.

 

@media only screen and (max-width: 749px){
.image-with-text__content.image-with-text__content--adapt h2 {
    font-size: 30px !important;
}
}

 

And Save. 

Result:

Made4uoRibe_0-1725393584357.png

 

 

 

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.