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

175
Views
element with position absolute clipped by wrapper

blue box attached to green box and if we have enough space its shoud be right to green box for 10px. But if we don't have enough space in red box, then blue box should move into green box and overlap it, but it should be inside red box

I am not able to insert screenshots here, so check the link below I have described my problem in https://jsfiddle.net/rkd69mfu/1/

<div class='wrapper'>
  <div class='message'>
    <div class='message__content'>
          <span>some content</span>
          <div class='message__content-menu'></div>
    </div>
  </div>
</div>

.wrapper {
  width: 50%;
  height: 300px;
  border: 1px solid black;
  overflow: hidden;
}

.message {
  width: 100%;
  height: 30px;
  border: 1px solid red;
}

.message__content {
  width: 90%;
  height: 15px;
  border: 1px solid green;
  position: relative;
}

.message__content-menu {
  position: absolute;
  width: 20px;
  height: 10px;
  border: 1px solid blue;
  left: 100%;
  margin-left: 10px;
}

What I have What I need

about 4 years ago · Juan Pablo Isaza
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!