Skip to content

Width of column #2033

Description

@djdony

Summary of problem or feature request

Hi. i can not set width for column Age. I tried to change in head

     <table class=" table-bordered table-hover" id="employeesTable">
            <thead>
            <th></th>
                <th>{{trans('messages.first_name')}}</th>
                <th>{{trans('messages.last_name')}}</th>
            <th width="10%">{{trans('messages.age')}}</th>

But still does not apply width.

Code snippet of problem

$(document).ready(function(){

    var table = $('#employeesTable').DataTable({
        processing: true,
        serverSide: true,
        ajax: '{{ route("pim.employees.datatable")}}',
        bAutoWidth:false,
        columns: [
            {data: 'first_name'},
            {data: 'last_name'},
            {data: 'birthdate',sWidth:'5%'},
            {data: 'actions', sortable: false, searchable: false},

        ],

System details

  • Operating System Ubuntu
  • PHP Version 7
  • Laravel Version 5.8
  • Laravel-Datatables Version 9.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions