Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

113
Views
Is it any possibility to change the image border automatically according to image shape?

When the user changes the square image to a circle image the border remains square. Is it any way to change the border to circle automatically?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

If I understand you correctly, please try this approach:

HTML:

<div class="image-cropper">
      <img src="your-image" alt="avatar" class="profile-pic">
</div>

CSS:

.image-cropper {
    width: 100px;
    height: 100px;
    position: relative;
    overflow: hidden;
    border-radius: 50%;
}
.profile-pic {
  display: inline;
  margin: 0 auto;
  margin-left: -25%; //centers the image
  height: 100%;
  width: auto;
}

It will circle your image perfectly as we have profile pic in social media.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!