Solved

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

Andrecolap
Excursionist
45 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
5991 1443 1782

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!

Please don't forget to 

Like

 and 

Mark Solution 

to the post that helped you. Thanks!
Sip, savor, and support – your

Coffee Tip

 helps us keep coding magic.❤️❤️❤️
For FREE, premium codes, and trusted, knowledgeable Shopify developers, visit us at

Made4uo.com


View solution in original post

Made4uo-Ribe
Shopify Partner
5991 1443 1782

This is an accepted solution.

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

And Save. Thanks!

Please don't forget to 

Like

 and 

Mark Solution 

to the post that helped you. Thanks!
Sip, savor, and support – your

Coffee Tip

 helps us keep coding magic.❤️❤️❤️
For FREE, premium codes, and trusted, knowledgeable Shopify developers, visit us at

Made4uo.com


View solution in original post

Replies 7 (7)

KetanKumar
Shopify Partner
36855 3637 11978

@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.
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
45 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
5991 1443 1782

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!

Please don't forget to 

Like

 and 

Mark Solution 

to the post that helped you. Thanks!
Sip, savor, and support – your

Coffee Tip

 helps us keep coding magic.❤️❤️❤️
For FREE, premium codes, and trusted, knowledgeable Shopify developers, visit us at

Made4uo.com


Andrecolap
Excursionist
45 0 5

hello @Made4uo-Ribe 

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

Thank you anyway

Made4uo-Ribe
Shopify Partner
5991 1443 1782

This is an accepted solution.

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

And Save. Thanks!

Please don't forget to 

Like

 and 

Mark Solution 

to the post that helped you. Thanks!
Sip, savor, and support – your

Coffee Tip

 helps us keep coding magic.❤️❤️❤️
For FREE, premium codes, and trusted, knowledgeable Shopify developers, visit us at

Made4uo.com


Andrecolap
Excursionist
45 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
5991 1443 1782

Good to hear! Welcome. 

Please don't forget to 

Like

 and 

Mark Solution 

to the post that helped you. Thanks!
Sip, savor, and support – your

Coffee Tip

 helps us keep coding magic.❤️❤️❤️
For FREE, premium codes, and trusted, knowledgeable Shopify developers, visit us at

Made4uo.com