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 fixed the table header?

enter image description here

when I scroll/ select the row and use the up/down arrow to scroll the row goes as shown in image but when I use the mouse every thing fine work

CSS:-

#header-fixed {
    font-family: AvenirLTProBook;
    font-weight: normal;
    background: #1b212a;
    position: sticky;
    top: 0; 
    box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.4);
    font-size: 1px;
} 

code:-

  <thead >
            <tr id="header-fixed">
                {headers.map(({ name, field }) => (
                    <th style={{borderRight: "1px solid rgb(105, 105, 105)"}}
                        key={name}                      
                    >
                        {name}
                    </th>
                ))}
            </tr>
        </thead>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Try this: Apply CSS to thead instead of tr

            <thead id="header-fixed">
            <tr>
                {headers.map(({ name, field }) => (
                    <th style={{borderRight: "1px solid rgb(105, 105, 105)"}}
                        key={name}                      
                    >
                        {name}
                    </th>
                ))}
            </tr>
            </thead>

CSS

#header-fixed{
  background-color: "any colour";
  position: sticky;
  top: 0;
}
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!