not 100% certain but I would suggest your background image is wider than the bordered box you are putting it in - I dont think it will auto resize. I “think” you will need to add a margin left & right to the background that is the width of the border (ie 5px each) and then reduce the width of the image to account for the reduction in margin (easier if you use % as the total width would need to be 100%
Thanks @robwuk.
Yeah, I found another way of doing it.
I found awesome article on Medium explaining the same.
You can go through it if you want. Here’s the link: