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

182
Views
How to show the correct image on hover

I have a list of projects, on one side I list their names, and on the other their image. The images are in absolute position.

I want to change the Z-index of an image when I hover over the project name, how do I achieve it?

Here is the main Work Page:

<main className='w-full h-full text-gray-50 text-lg py-32'>
      <div className='container flex content-center w-full h-full '>
        <header className='px-12 flex flex-col justify-center'>
          <h1 className='bg-clip-text text-transparent bg-gradient-to-r from-red-600 to-yellow-600 text-8xl font-bold'>
            Recent Work
          </h1>
          <ul className='mt-12 flex flex-col gap-4'>
            {projectsData.map((project) => (
              <WorkInfo key={project.id} project={project} />
            ))}
          </ul>
        </header>
        <section className='px-12 flex-grow'>
          <div className='max-w-xs w-full h-full'>
            <ul className='relative w-full h-full'>
              {projectsData.map((project, index) => (
                <WorkImage
                  key={project.id}
                  project={project}
                  index={index}
                  isHover={isHover}
                />
              ))}
            </ul>
          </div>
        </section>
      </div>
    </main>

Here is the WorkImage component, where I list the Images of the projects:

const WorkImage = ({ index, isHover, project }) => {
  return (
    <li className={`absolute w-full h-full`}>
      <Image
        src={project.image}
        alt={project.title}
        layout='fill'
        blurDataURL
        placeholder='blur'
        className='w-full h-full object-cover'
      />
    </li>
  );
};

Here is the WorkInfo component, where I list the names of projects:

const WorkInfo = ({ project }) => {
  return (
    <li key={project.id} className='max-w-xs group'>
      <a
        href={project.url}
        target='_blank'
        rel='noopener noreferrer'
        className='flex gap-1 items-center'>
        <div className='h-px w-0 group-hover:w-full bg-gray-50 transition-all duration-700'></div>
        <h3 className='whitespace-pre'>{project.title}</h3>
      </a>
    </li>
  );
};
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!