1

I am working on a project in which I have to print data having multiple columns and rows. I want to print headers on every printing page so that it will be easier to understand with the headers on every page. I know THEAD but it supports only Firefox. I want it for IE and chrome. Please help me.

Darin Kolev
  • 3,401
  • 13
  • 31
  • 46
samiksha dhok
  • 33
  • 2
  • 9
  • This > http://stackoverflow.com/questions/7211229/having-google-chrome-repeat-table-headers-on-printed-pages would help you to make it happen. – Niks Jain Oct 12 '12 at 12:07

2 Answers2

1

http://www.evagoras.com/2011/02/10/printing-table-headers-on-every-page/
This link helped me to solve it. It is running successfully on IE.

<style type="text/css" media="print,screen" >
th {
    font-family:Arial;
    color:black;
    background-color:lightgrey;
}
thead {
    display:table-header-group;
}
tbody {
    display:table-row-group;
}
</style>

Thanks for all your responses.

samiksha dhok
  • 33
  • 2
  • 9
0

Put your headers in an actual <thead> element. That seems to work for me in the past. I'm on my phone right now so cannot test it in the specific browsers you mentioned.

References

Community
  • 1
  • 1
kzh
  • 19,810
  • 13
  • 73
  • 97