Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82117

Column width set to 133px in Chrome, even if it doesn't need to.

$
0
0
Not sure what's causing this, whether it's FixedColumns, Datatables, or something of my own doing. For whatever reason, the column width in Chrome is set to 133px, even if the content could easily fit in a smaller width. It does stretch it to a larger size if needed, but it's almost like the minimum width is 133px. IE and Firefox both display correctly, though. I'd like it to just be the size of the largest amount of data. bAutoWidth is set to false.

EDIT: Ah, figured it out. It's because I have a searchable column input in the footer, so it's stretching to fit that. My workaround is to set the input boxes to 1px by default and a class of "search_box", and in the fnDrawCallback, I have the following code (any suggestions are certainly welcome):


$('.search_box').each(function(){

	$(this).css('width', $(this).parent().css('width'));
});

Viewing all articles
Browse latest Browse all 82117

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>