{hero}

scrollX

Since: DataTables 1.10

Horizontal scrolling.

Description

Enable horizontal scrolling. When a table is too wide to fit into a certain layout, or you have a large number of columns in the table, you can enable horizontal (x) scrolling to show the table in a viewport, which can be scrolled.

Type

boolean

Description:
  • false - No horizontal scrolling
  • true - Enable horizontal scrolling in the table

Default

  • Value: false

Example

Enable horizontal scrolling:

new DataTable('#myTable', {
	scrollX: true
});

Related

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