Jayson Lacson Jayson Lacson - 2 months ago 10x
CSS Question

How to automatically adjust the column width of datatables

I am already searched this issue over internet, I have also used their examples too but It did not work on mine. I have datatables with zero configuration setting, what I want to achieve is that I want the column to be auto adjusted based in the contents on the column.

here's my code.

<script type="text/javascript" language="javascript" class="init">

$(document).ready(function() {
} );


I have also tried to adjust using the tables but it did not work.

<table id="example" class="display" cellspacing="0" width="100%">


Have you tried this in table cell width:auto; ?