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

91
Views
How does the Dev.to website wrap their post cards inside a link?

Example of a post card

I know they use an absolutely positioned link tag one level below the root element and sized it to fill the width and height of the card. But I can't figure out how you can still click on individual links without the full size link blocking it.

<article>
  <a id="full sized link"></a>
  <div id="actual content">
    <h3>
      <a id="individual link">TITLE</a>
    </h3>
  </div>
</article>

Here is roughly how the cards are structured.

I think them may be using JavaScript to redirect you.

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

0

Try the anchor tag you want to target to set

 <a id="full-sized-link" href='#' ></a>

#full-sized-link{
    height: 100%;
        position: absolute;
        width: 100%;
        top: 0;
        left: 0;
        cursor: pointer;
        z-index: 1;
    }
    
    article{
    position:relative;
    }

And on individual links higher z-index

#individual-link{
    position: relative;
    z-index: 2;
}
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!