We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Re: image shape with text section

Solved

image shape with text section

Andrecolap
Excursionist
48 0 5

Hi there,

 

I have a problem with my website, which I built using Dawn theme.

 

The image in the 'image with text' section at the bottom of the home page has changed in shape. It used to be square, and I would like it to be square as the image in the 'image with text' section in the 'about us' page. The original image is square.

 

Link and screenshot below.

 

Any idea of how to fix this?

 

Many thanks

 

 

https://900artanddesign.com/

 

Screenshot_20240508-122139_Chrome.jpg

 

 

 

Accepted Solution (1)

niraj_patel
Shopify Partner
2391 516 516

This is an accepted solution.

Hello @Andrecolap 

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: 768px){
 .image-with-text__media--small {
      height: 29.2rem !important;
  }
}
</style>

techlyser_web_0-1715178601596.png

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

Shopify Partner || Helping eCommerce Stores
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution.
- For further discussion contact: Email ID- info@techlyser.com

View solution in original post

Replies 5 (5)

niraj_patel
Shopify Partner
2391 516 516

This is an accepted solution.

Hello @Andrecolap 

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: 768px){
 .image-with-text__media--small {
      height: 29.2rem !important;
  }
}
</style>

techlyser_web_0-1715178601596.png

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

Shopify Partner || Helping eCommerce Stores
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution.
- For further discussion contact: Email ID- info@techlyser.com
Andrecolap
Excursionist
48 0 5

Thank you @niraj_patel 

I used your code, adjusted the height to 35 rem, and the image is now again square on mobile.

 

It still is not square on desktop (see screenshot below), can you suggest any solution?

 

Andrecolap_0-1715237014106.png

 

niraj_patel
Shopify Partner
2391 516 516

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) {
  .image-with-text__media--small {
       height: 338px !important;
  }
}
@media screen and (min-width: 768px)
  .image-with-text__media--small {
      height: 31.4rem !important;
  }
}
</style>

techlyser_web_0-1715238427583.png

techlyser_web_1-1715238464161.png

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

Shopify Partner || Helping eCommerce Stores
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution.
- For further discussion contact: Email ID- info@techlyser.com
Andrecolap
Excursionist
48 0 5

Hi @niraj_patel,

 

this didn't work, I also tried to change something within your code, but that didn't help. Maybe it is because of some other changes I previously did on margins and paddings.

 

If you have another solution, please do let me know.

 

Thank you

Made4uo-Ribe
Shopify Partner
10211 2427 3079

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:

 

@media only screen and (max-width:749px){
.image-with-text__media--small {
    height: 60vh;
    width: 60vh;
    margin:auto;
} 
}

 

And Save. 

Result:

Made4uoRibe_0-1715178613707.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 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.