1

I have html table as below;

https://jsfiddle.net/supun151515/fwL8ut4k/

http://jsfiddle.net/supun151515/AC725/16/ -->jquery plugin

I want to make headers fixed and first 7 columns fixed. I have tried with many jQuery plugins even pure CSS;

tbody {
 float: left; display: block; overflow-y: scroll; max-height: 100px;
}
tr {
float: left; display: block;
}
td {
float: left; display: block;
}

Nothing worked for me. Any good jQuery plugin to work with multiple rows header or pure CSS is appreciated.

1 Answer 1

2

If you want a table where only the columns scroll horizontally and headers remain fixed, you can `

position: absolute

the first 7 columns and your row header (and specify their width explicitly), and then wrap the entire table in an overflow-x: scroll block.

Here is an example for your reference :

https://jsfiddle.net/RMarsh/bzuasLcz/3/

Sign up to request clarification or add additional context in comments.

2 Comments

I am using multi rows header, check your fiddle with my updated table structure. The table should looks like as shown in picture imgur.com/a/yapMq
Your example is close to what I am trying to accomplish. How do you fix multiple columns? Say, the first four columns, for example? While keeping the header also fixed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.