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

62
Views
Show drop down only on overflow div

CSS Code

.table {
  display: grid;
  grid-template-columns: 170px 300px;
  border: 1px solid black;
}
.tr {
  display: contents;
}
.td {
  border-left: 1px solid black;
  overflow: hidden;
  text-overflow: ellipsis;
}

JSX code

import "./styles.css";

export default function App() {
  return (
    <div className="table">
      <div className="tr">
        <div className="td">
          abcsfsaffadsfsdfsafsdsfsadfdasdfasfasdffasfasfasdfsd
        </div>
        <div className="td">abcsfs</div>
      </div>
    </div>
  );
}

You can see the code at Codesandbox

You can see that we have first column overflow, but second column not enter image description here

When hover I hope to display a boxes for overflow column only to show full text, like the following enter image description here

The problem is how to detect whether a div column is overflow for showing the box?

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!