can we add here white border?

Solved

can we add here white border?

Emiway
Pathfinder
220 0 44

can we add here white background with round corner just like text box.. because the image is short & text block is bigger.. i dont want image to be stretched 

URL: https://redpandaoutdoor.in/products/pivot

Screenshot 2024-09-28 231740.png

Accepted Solution (1)

BSSCommerce-B2B
Shopify Partner
1729 518 582

This is an accepted solution.

Step 1: Go to Admin -> Online store -> Theme > Edit code

Step 2: Search for the file theme.liquid

Step 3: Add this code before </body> tag

.media-with-text__media.rounded img {
    background-color: white !important; 
}


Here is result 

BSSCommerceB2B_0-1727548385490.png

 

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now

View solution in original post

Replies 6 (6)

BSSCommerce-B2B
Shopify Partner
1729 518 582

This is an accepted solution.

Step 1: Go to Admin -> Online store -> Theme > Edit code

Step 2: Search for the file theme.liquid

Step 3: Add this code before </body> tag

.media-with-text__media.rounded img {
    background-color: white !important; 
}


Here is result 

BSSCommerceB2B_0-1727548385490.png

 

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now

BSSCommerce-B2B
Shopify Partner
1729 518 582

If it is helpful, can you kindly give us many likes and mark the solution for us? 

This can be a reference for other merchants if they have an issue like you and greatly motivate us to contribute to our community. 

Have a nice day, sir! 

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now

Emiway
Pathfinder
220 0 44

Not working

Emiway
Pathfinder
220 0 44

You Forgot to add style tag

BSSCommerce-B2B
Shopify Partner
1729 518 582

Sorry my bad, Happy to help you 

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now

Laza_Binaery
Shopify Partner
133 31 50

Hi @Emiway 

 

You can edit  this code in theme.css

 

.media-with-text__media {
    grid-area: media;
    position: relative;
    overflow: hidden;
}

and add a white background

.media-with-text__media {
    grid-area: media;
    position: relative;
    overflow: hidden;
    background: white;
}

and while top looks fine bottom is a bit cut off.

 

screenshot-redpandaoutdoor_in-2024_09_28-20_45_36.png

 

And I know you said you do not want to stretch an image, but if you remove

.media-with-text__media img {
    object-fit: contain !important;
}

or change it to

.media-with-text__media img {
    object-fit: cover !important;
}

In probably section code, that will fill up the image fine and will not stretch it.

 

The last option is to make the image the same aspect ratio as the block so instead 800 x 800, 1:1 it could be 788:828 so 1:1,05 that should make fill up the space without any code changes.

Kind regards
Laza
www.binaery.com