Change margins to text in image with text section in mobile only (Dawn Theme)

Solved

Change margins to text in image with text section in mobile only (Dawn Theme)

Andrecolap
Excursionist
48 0 5

Hi there,

I have a problem with the last section of the home page of the website, it's a 'Image with text' section and I would like to reduce the left margin on mobile only and the top margin on desktop only, see screenshots below. There aren't options to control this spacing on the editor, so I think I would need to add some code. Any suggestions?

I used Dawn theme 12.0.0, below the link to my website:

https://900artanddesign.com/

 

Andrecolap_0-1714226789820.jpeg

Andrecolap_1-1714226812146.png

 

Accepted Solutions (2)

Made4uo-Ribe
Shopify Partner
10202 2422 3068

This is an accepted solution.

Hi @Andrecolap 

Check this one. 

From your Shopify admin dashboard, click on "Online Store" and then "Themes".

Find the theme that you want to edit and click on "Actions" and then "Edit code".

In the "Assets" folder, click on "base.css, style.css or theme.css" file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:

 

.image-with-text__content {
    padding-top: 2rem;
}
@media only screen and (max-width: 749px){
.image-with-text__content {
    padding-left: 2rem;
}
}

 

And Save. 

Result:

Made4uoRibe_0-1714246266541.png

Made4uoRibe_1-1714246275120.png

Note: You can adjust the padding size you like. 

 

 

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 are highly appreciated. Coffee tips fuel my dedication.
Get experienced Shopify developers at affordable rates—visit Made4Uo.com for a quick quote!
Need THEME UPDATES but have custom codes? No worries, for an affordable price.

View solution in original post

Made4uo-Ribe
Shopify Partner
10202 2422 3068

This is an accepted solution.

Try to paste in component-image-text-with-text.css. 

And Save. Thanks!

If this fixed your issue, Likes and Accept as Solution are highly appreciated. Coffee tips fuel my dedication.
Get experienced Shopify developers at affordable rates—visit Made4Uo.com for a quick quote!
Need THEME UPDATES but have custom codes? No worries, for an affordable price.

View solution in original post

Replies 7 (7)

KetanKumar
Shopify Partner
37622 3670 12166

@Andrecolap 

oh sorry for that issue can you please try this code
1. Go to Online Store->Theme->Edit code
2. Asset->/component-image-with-text.css ->paste below code at the bottom of the file.

@media (max-width: 749px) {
.image-with-text__content {
    padding-left: 0;
    padding-right: 0;
}
}


 

If helpful then please Like and Accept Solution. Partnership of your ️ Coffee Tips and my code can bring miracles.
Want to modify or custom changes on store Hire Me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
Andrecolap
Excursionist
48 0 5

hello @KetanKumar 

Thanks for your message.

That worked for the mobile version, thank you, but didn't work on the desktop, where I would still like to get rid of the top margin above the title and align it to the picture to the left (see screenshot below). Any idea?

Andrecolap_0-1714246329977.png

 

 

 

Made4uo-Ribe
Shopify Partner
10202 2422 3068

This is an accepted solution.

Hi @Andrecolap 

Check this one. 

From your Shopify admin dashboard, click on "Online Store" and then "Themes".

Find the theme that you want to edit and click on "Actions" and then "Edit code".

In the "Assets" folder, click on "base.css, style.css or theme.css" file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:

 

.image-with-text__content {
    padding-top: 2rem;
}
@media only screen and (max-width: 749px){
.image-with-text__content {
    padding-left: 2rem;
}
}

 

And Save. 

Result:

Made4uoRibe_0-1714246266541.png

Made4uoRibe_1-1714246275120.png

Note: You can adjust the padding size you like. 

 

 

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 are highly appreciated. Coffee tips fuel my dedication.
Get experienced Shopify developers at affordable rates—visit Made4Uo.com for a quick quote!
Need THEME UPDATES but have custom codes? No worries, for an affordable price.
Andrecolap
Excursionist
48 0 5

hello @Made4uo-Ribe 

I tried to paste this in base.css but didn't work.

Thank you anyway

Made4uo-Ribe
Shopify Partner
10202 2422 3068

This is an accepted solution.

Try to paste in component-image-text-with-text.css. 

And Save. Thanks!

If this fixed your issue, Likes and Accept as Solution are highly appreciated. Coffee tips fuel my dedication.
Get experienced Shopify developers at affordable rates—visit Made4Uo.com for a quick quote!
Need THEME UPDATES but have custom codes? No worries, for an affordable price.
Andrecolap
Excursionist
48 0 5

Thank you @Made4uo-Ribe 

That works well, I adjusted the padding size and I think now it is better than before.

Thank you

Made4uo-Ribe
Shopify Partner
10202 2422 3068

Good to hear! Welcome. 

If this fixed your issue, Likes and Accept as Solution are highly appreciated. Coffee tips fuel my dedication.
Get experienced Shopify developers at affordable rates—visit Made4Uo.com for a quick quote!
Need THEME UPDATES but have custom codes? No worries, for an affordable price.