« Web, HTML, Tech Forum

how to add lace border around profile layout?

i have seen many layouts with lace borders, i think its so cute but i have not found any answers about how to implement or do it

https://spacehey.com/ceresites profile for example, you see the lace all around?! how do i do it:( its so cute im losing my mind!!!!!!!!!!!


Report Topic

2 Replies

Sort Replies:

Reply by suki

posted

very late reply... but if you still want to know, here's how that particular profile does it:




.container {
border: 40px solid;
border-image: url('https://melokaji.neocities.org/strawberrybacking.png') repeat;
border-image-slice: 30;
border-image-outset: 10px;
}



if you want that same lace design, you can just copy that CSS to your page and it should hopefully work fine. but you should probably reupload the linked image to imgbb or another host so you're not hotlinking a random neocities site.


if you want to use a different design (or make your own), you'll need to tweak some of the numbers so the border looks correct. here's what each of them is for.


  • border = raise/lower the number if your design is thicker/thinner.

  • border-image-slice = how much of the image gets cut off before drawing the border. to see how it works, copy the CSS from above but change the slice. watch how it affects what's shown. 15 halves the lace, 45 shows both sides, etc. the image always scales to fit the border size regardless of the slice value. so settle on your border size first and then start tweaking the slice.

  • border-image-outset = extra distance between the border and the edge of the div. this one is more of a preference. in the example they're basically using it like padding, except it expands outward unlike padding which contracts inward.



Permalink Report Reply

Reply by gene000000

posted

Wow thank you so much ! it’s very specific but I’m I have the answer now hehehe




Permalink Report Reply