Solved

Dawn 'Image with text' section - make image smaller

hnaegele
Excursionist
29 1 3

Hi there - I'm using the Dawn theme and on my homepage I have two "Text with image" containers.   I've managed to make the image square by pasting the following code in the theme.liquid section above the tag </head>:

 

<style>
.image-with-text .image-with-text__media-item.image-with-text__media-item--small{
width: 50% !important;
}
</style>

 

I would like the images to remain square but make them smaller - maybe 75% of the current size.  Here is the current page - https://29and11.com/  Could anyone help me with that?

 

Thank you!

Accepted Solution (1)
Made4uo-Ribe
Shopify Partner
6037 1450 1788

This is an accepted solution.

Yep, since you take 30% of 100% height n width. We can add 15% margin. 

The margin will add automatic in all sides.

 

.image-with-text .image-with-text__media-item.image-with-text__media-item--small img {
    height: 70%;
    width: 70%;
    margin: 15%;
}

 

And Save.

Result;

Made4uoRibe_1-1712952547941.png

 

 

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

Replies 4 (4)

Made4uo-Ribe
Shopify Partner
6037 1450 1788

Hi @hnaegele 

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 .image-with-text__media-item.image-with-text__media-item--small img {
    height: 75%;
    width: 75%;
}

 

And Save. 

Result:

Made4uoRibe_0-1712950733874.png

 

 

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


hnaegele
Excursionist
29 1 3

That definitely made the pictures the size I was hoping for - thank you!! Now my issue appears to be that they aren't centered with the text.  Is there a way to center them and have the spacing between the picture and text equal with the space on the margins?  In the top text with image container, the margins to the right of the picture are large, and in the lower text with image container, the space between the picture and text is large.  Is there some way to evenly distribute the spacing?

 

Thank you so much!!

Made4uo-Ribe
Shopify Partner
6037 1450 1788

This is an accepted solution.

Yep, since you take 30% of 100% height n width. We can add 15% margin. 

The margin will add automatic in all sides.

 

.image-with-text .image-with-text__media-item.image-with-text__media-item--small img {
    height: 70%;
    width: 70%;
    margin: 15%;
}

 

And Save.

Result;

Made4uoRibe_1-1712952547941.png

 

 

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


hnaegele
Excursionist
29 1 3

That worked perfectly - thank you so much for your help!!  You are a lifesaver!!! - Haley