Skip to content Skip to sidebar Skip to footer

How To Make A Tables Header Static When Scrolling

This issue has appeared many times. I want the table's title to be fixed when I scroll down, how can I do that? My code for the table looks like this Copy

CSS:

.table_title {
    position: fixed;
    background: #000;
    color: #fff;
}

.tr_first {
    top: 150px;
    position: relative;
}

.wrapper {
    height: 150px;
    overflow: scroll;
}

Demo on jsfiddle: http://jsfiddle.net/q2jRu/

Solution 2:

Simple:please first make separate div for head and give id for that div e.i Then make in css rule #head{position:fixed;} Now solve your problem.

Post a Comment for "How To Make A Tables Header Static When Scrolling"