How to add a patterned border around content sections using Venture theme?

I am trying to add a border around the content sections on my site. I want to use a pattern (.jpg) as the border design. I am using the venture theme. Please let me know if you can help?

1 Like

@JS777 Please provide the URL of your store and if it is password protected please share the password too. Thanks

@JS777

Please share your website URL and password if any. I will check and provide a solution here.

Thanks!

Thank you! The URL is: https://laface-skin-care.myshopify.com/?_ab=0&_fd=0&_sc=1&key=a2a35434a549b03ad233264794405b77106e714c7d9528442a82aae4c696697d

1 Like

@JS777

Please share screenshot what do you want !

Thanks!

@JS777

Add code your assets/theme.scss.liquid bottom of the file.

.main-content .page-width {
    border: 4px solid grey !important;
}

Thanks!

This worked perfectly. Thanks!

1 Like

Also, do you know if there is a way to replace the color around the border with an image? The color is currently “solid #1a627b.” I want to replace this color with a pattern image. Is this possible?

@JS777

Try to add the following code.

.main-content .page-width {
    border-image-source: url(border.png);
    border-image-slice: 20;
    border-image-width: 20;
    border-image-outset: 1;
    border-image-repeat: round;
}

Note: Replace border.png image name with your image url.

Thank you! This added the border image to the sides of the sections, however the border is missing in the middle of the top and bottom of the sections (see screenshot below). Can you help me fix this? Also is there a way to make the border thickness the same on all sides? Thanks again!

1 Like

@JS777

Try to add the following code.

.main-content .page-width {
    width: 100%;
    border: 50px solid pink;
    height: auto;
    border-image: url("https://cdn.shopify.com/s/files/1/0550/8644/8825/t/5/assets/plant-cell-pattern.jpg") 50;
}

Thanks!

Thank you! This worked great, however is there a way to prevent it from stretching the image on the top and bottom?

1 Like

@JS777

try this css class

.main-content .page-width {
    width: 100%;
    border: 30px solid pink;
    height: auto;
    border-image: url(https://cdn.shopify.com/s/files/1/0550/8644/8825/t/5/assets/plant-cell-pattern.jpg) 30;
}

This definitely improved it, but the image still looks funny when stretched horizontally. Is there a way to use the image as a pattern where it duplicates the image rather then stretches it? Thanks again for all your help!

@JS777

Please use this image

I just uploaded this image. Do you think I should modify the background image I want to use so that it better stretches (i.e. making it rectangular vs. square?)