In a node.js application: How can I lock the top row of a table in place, similar to Excel's freeze panes feature?
I think this might involve using some CSS styling, but I'm not exactly sure how to achieve it. When I tried using fixed
, the entire table was frozen instead of just the top row. This meant that when new items appeared below the visible area of the browser window, no vertical scroll bars were shown to access them. Using sticky
didn't seem to work either.
.css
#one {
position: fixed;
top: 100px;
left: 15px;
}
app.js
<div className="row" id="one">
<table className="table-hover">
<thead>