Avoid Horizontal Scrolling with JQuery DataTable plugin -



Avoid Horizontal Scrolling with JQuery DataTable plugin -

how can set column width in table uses jquery datatable plugin avoid horizontal scroll ?

what i've tried

var table = $(data.datatable.container).datatable({ dom: "frtis", "columndefs": [{ "width": "5%", "targets": 0 }], autowidth: false, scrollx": false, scrolly: "250px", paging: true, order: true, language: { info: data.datatable.info, search: data.datatable.language.search, zerorecords: data.datatable.language.zerorecords, emptytable: data.datatable.language.emptytable, infoempty: data.datatable.language.infoempty, infofiltered: data.datatable.language.infofiltered, loadingrecords: data.datatable.language.loadingrecords, processing: data.datatable.language.processing, paginate: { first: data.datatable.language.paginate.first, previous: data.datatable.language.paginate.previous, next: data.datatable.language.paginate.next, last: data.datatable.language.paginate.last } } });

but doesn't work

table

<table id="tabelavendedorporestado" style="overflow-x: hidden;" class="table tabelalistagemvendedores"> <thead> <tr> <th>vendedores</th> <th>valor</th> <th>%</th> <th></th> </tr> </thead> <tbody> <!-- tr td here --> </tbody> </table>

you seek prepare pure css this:

div.container { width: 95%; }

match actual container class datatables, verify don't have fixed widths. first column seems much wider should.

jquery jquery-datatables

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -