Datatables elements not follow table size
Datatables elements not follow table size

I recently started playing with bootstrap and datatables. I have a table created with bootstrap which is 50rem wide but datatables elements (search, filter, pagination) stays 100% wide. How can I adjust that so datatable elements follow table width.
I use this <table id=datatable1 class='table' style='width: 50rem';>
followed by standard table elements.
Thanks
This discussion has been closed.
Answers
I figured it out... I added div and specified the same width as for a table.
<
table> should be in a
<
div id='container'>
set table width 100%;
and in
window resize()
{
container.find(".dataTables_scrollBody").css('height', container.height() - 80);
}
adjust the scrollbody height
This does not work for me.
@jgethers We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin