Minor fixes for Datatables + Bootstrap

Minor fixes for Datatables + Bootstrap

mwhousermwhouser Posts: 14Questions: 1Answers: 0
edited April 2012 in General
I am using Datatables 1.8.2 with Bootstrap 2.0.2 based on http://datatables.net/blog/Twitter_Bootstrap_2

The following changes are required to work with a fluid layout.

1. DT_bootstrap.css: change
[code]
div.dataTables_filter label {
float: right;
}
[/code]
to
[code]
div.dataTables_filter {
float: right;
}
[/code]

Otherwise, the filter does not sit on the top-right properly.

2. Change the sDom parameter from
[code]
"sDom": "<'row'<'span6'l><'span6'f>r>t<'row'<'span6'i><'span6'p>>",
[/code]
to
[code]
"sDom": "<'row-fluid'<'span6'l><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>",
[/code]

This changes the "row" lines from bootstrap to "row-fluid".

Replies

  • allanallan Posts: 63,810Questions: 1Answers: 10,516 Site admin
    Nice one - thanks for posting this!

    Regards,
    Allan
This discussion has been closed.