Column width problem.

Column width problem.

MickBMickB Posts: 103Questions: 25Answers: 2
edited August 2017 in General

Can anyone see why my columns are not wide enough (Activity Date and Palletised By)?

debug code: ovipus

Mick

Answers

  • allanallan Posts: 63,683Questions: 1Answers: 10,498 Site admin

    You've got an old version of DataTables, so the first thing to do would be to try the latest version. Failing that, I think this might be something I'd need a link to a test case for as it might be CSS related.

    Regards,
    Allan

  • MickBMickB Posts: 103Questions: 25Answers: 2

    Updated and it is still the same:

    debug code: uquvud

    I think it is something to do with the datetime field.

    Mick

  • MickBMickB Posts: 103Questions: 25Answers: 2

    Tried to recreate here and it looks OK:

    http://live.datatables.net/dajowime/1/edit

  • MickBMickB Posts: 103Questions: 25Answers: 2
    edited August 2017

    I have got this working by adding:


    table.dataTable thead > tr > th.sorting_asc, table.dataTable thead > tr > th.sorting_desc, table.dataTable thead > tr > th.sorting, table.dataTable thead > tr > td.sorting_asc, table.dataTable thead > tr > td.sorting_desc, table.dataTable thead > tr > td.sorting{ padding-right: 10px; padding-left: 10px; }

    Just a bit concerned that this will mess something else up.

    Mick

  • allanallan Posts: 63,683Questions: 1Answers: 10,498 Site admin

    Hi Mick,

    No that looks like it should be absolutely fine. Nice one.

    Allan

  • MickBMickB Posts: 103Questions: 25Answers: 2

    This isn't quite working, for some columns to clear I need to go as much as :

      padding-right: 46px;
      padding-left: 35px;
    

    This then makes some of the other columns too wide.

    Any ideas what else I could do or what we could do to this resolve this problem?

    As usual it's not really possible to give you access to this site

    I don't understand what I am doing differently to cause this..

    Mick

  • allanallan Posts: 63,683Questions: 1Answers: 10,498 Site admin

    I'd really need a link to a test case showing the issue so I can help to debug it I'm afraid. I don't know what would be causing it. Best guess is that box-sizing: content-box; is being applied to the table cells or perhaps border-collapse: collapse; to the table?

    Allan

This discussion has been closed.