What's your biggest current challenge? Have your say in Community Polls along the right column.

Re: I tried to align image and content in same line of multicolumn section of dawn theme

I tried to align image and content in same line of multicolumn section of dawn theme

TheLivingCo
Explorer
87 0 17

I tried to align image and content in same line of multicolumn section of dawn theme using below custom code but other column image is shrinked please help.

 

.multicolumn-card.content-container {
display: flex;
align-items: center;
}

 

 

ShopifyErrorMulticolumn.png

The Living Co.
Replies 3 (3)
TheLivingCo
Explorer
87 0 17

PFB my store preview URL

 

https://matnaruxyc26wno7-43407245474.shopifypreview.com

The Living Co.

rajweb
Shopify Partner
387 36 52

Hi @TheLivingCo ,

Add the Following CSS code:

 

.multicolumn-card.content-container {
    display: flex;
    align-items: center; /* Aligns items vertically */
}

.multicolumn-card.content-container img {
    max-width: 100%; /* Ensures images do not exceed their container's width */
    height: auto; /* Keeps the image aspect ratio */
    flex: 0 0 auto; /* Prevents the image from shrinking */
    margin-right: 20px; /* Optional: Add space between image and content */
}

.multicolumn-card.content-container > div {
    flex: 1; /* Allows content to take up remaining space */
}

 

After saving the changes, check your store to see if the images and content align properly. Let me know if you need any further adjustments!

 
 
-Need a Shopify developer?
https://rajatweb.dev/
Email: rajat.shopify@gmail.com
TheLivingCo
Explorer
87 0 17

After adding above code to custom css image size changes to big size i want image size to be same for both columnShopifyErrorMulticolumn1.png

The Living Co.