I want to use a roundish image as a border image to cover the whole outer part of an image. You can see two images below one of them being rectangle and the other one being round. I was able to figure out how to use the rectangle image to perfectly fit the given image, but now I am trying to use the same technique to fit the circular image as the border and I can't find a way to make this happen with the same technique. So currently for the rectangle image following styling is being used:
.frame{
height: 192px;
width: 160px;
border-width: 30.4px 32px;
border-image: url("/images/frame-4.png") 100 / 1.6 / 0 stretch;
}
Now to use the circular image as border and place the image inside, I am using border-radius on the frame class.
.frame{
border-radius: 111px;
height: 192px;
width: 160px;
border-color: red;
border-width: 16px;
background: blue;
/* border-image: url("/images/frame-5.png") 100 / 1 / 0 stretch; */
}
When I use a border color everything looks fine:
But when I turn on the border image things start to fall apart:
I am not sure what is happening and how to fix this. https://i.stack.imgur.com/TOSDv.jpg here is the image link if anyone want to give this a try. Since I want the border image to perfectly wrap the image, I thought that border images are the best way of doing it instead of using multiple div
. Is there an easier and a better way of doing it?