« Web, HTML, Tech Forum

How do I add an image border to my profile picture?

I've been trying to look for ways to put this as my profile picture but somehow I can't find any ways that work. Is this even possible?


Report Topic

2 Replies

Sort Replies:

Reply by ◇Nokii◇

posted

Uhh try this? This is the code that I used. I just copy and pasted this one and idk how it actually completely works so not sure if it'll also work the same for you


.general-about .profile-pic::before{

  content: '';

  background: url('insert link') no-repeat;

  background-size: cover;

  display: block;

  width:170px;

  height: 170px;

  z-index: 10;

  position: absolute;

  top: -7px;

  left: -4.5px;

}


Permalink Report Reply

Reply by mikayla

posted

<style>
.profile-pic {
  position: relative;
  display: inline-block;
  background: url('url here') no-repeat center center;
  background-size: 100% 100%;
  padding: 8px 12px; /* vertical (top/bottom), horizontal (left/right) */
  box-sizing: content-box;
}

.profile-pic img {
  display: block;
  width: 110px;  /* adjust to match your actual profile pic size */
  height: 160px;
}
</style>


this is what i used for mine :) <3


Permalink Report Reply