1

I make some reaserch on stack overflow, some topic have similar question, but they usually was asking about another library.

In most cases position: sticky; top: -1px give the sticky header Table. In my case do not get it.

           <thead
      style={{position: "sticky", top: 0}}
            >
              <tr>

                <th  style={{position: "sticky", top: "-1px"}} scope="col">y </th>
                <th  style={{position: "sticky", top: "-1px"}} scope="col">x </th>
                <th  style={{position: "sticky", top: "-1px"}} scope="col">z</th>

          
              </tr>

juliomalves
  • 42,130
  • 20
  • 150
  • 146
  • 2
    Does this answer your question? [Table fixed header and scrollable body](https://stackoverflow.com/questions/21168521/table-fixed-header-and-scrollable-body) – kmoser May 29 '22 at 21:47
  • You don't need to set the style for each ``, just the ``. See https://stackoverflow.com/a/63956237/378779 – kmoser May 29 '22 at 22:01
  • Remember, anytime `position: sticky` is being used, none of the parent element can have `overflow: hidden` on them. This will cause it to not work. – treckstar May 29 '22 at 23:47

0 Answers0