datatable column width

Topic: datatable column width

ozgehan priority asked 2 years ago


I have a datatable with two columns. Datatable arrange width of the columns by 50-50 (equal width) but I want to make one column smaller than the other one . How can I achieve that?

P.S : I am using mdb-datatable rather than normal mdb-tbl because of pagination and search options.


Magdalena Dembna staff answered 2 years ago

Unfortunately, we don't have a property which allows controlling the exact width of each column. You can try using the autoWidth prop - it will adjust each column's width to its content. If this solution will not work for you, you can inspect the element in your dev tools and write custom CSS. Kind regards, Magdalena

Rickal Hamilton free commented 1 year ago

how do i add the autowidth prop

Mikołaj Smoleński staff commented 1 year ago

Here's an example code: <mdb-datatable-2 autoWidth>. Best regards

Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.



Specification of the issue
  • User: Priority
  • Premium support: Yes
  • Technology: MDB Vue
  • MDB Version: 6.0.0
  • Device: computer
  • Browser: chrome
  • OS: windows
  • Provided sample code: No
  • Provided link: No