Since: FixedHeader 3.0.0

Offset the table's fixed header.
Please note - this property requires the FixedHeader extension for DataTables.


Many web-pages and apps use a navigation element that has fixed positioning applied to it at the top of the page to to provide quick access to common functions and links for an end user. This needs to be accounted for when using FixedHeader so the offset caused by the fixed element doesn't interrupt the correct positioning of the fixed header.

This parameter provides a method that you can use to inform FixedHeader that an offset should be applied, and what that offset should be.




Set the offset (in pixels) of the header element's offset for the scrolling calculations.


  • Value: 0


Set the header offset to a known value:

new DataTable('#myTable', {
	fixedHeader: {
		headerOffset: 50

Use jQuery to calculate a required offset:

new DataTable('#myTable', {
	fixedHeader: {
		headerOffset: $('#navMenu').outerHeight()


The following options are directly related and may also be useful in your application development.