Fixed column size

Fixed column size

msvfmsvf Posts: 7Questions: 0Answers: 0

Hello,

I'm using a dataTable with a few columns where one of them is the ID column.
Unfortunately, i have ID extremely large and they bug the CSS.

How can i make a column with a fixed size, independently of the size of the ID?

Thank you so much,
Best Regards.

Replies

  • allanallan Posts: 61,726Questions: 1Answers: 10,110 Site admin

    One option for very long columns is the ellipsis plug-in.

    If that isn't suitable and you want absolute pixel perfect control you'd need to use table-layout: fixed; in your CSS.

    Allan

  • msvfmsvf Posts: 7Questions: 0Answers: 0

    Thank you Allan,

    First of all, i'm sorry for taking so long to answer back to you.

    With your advice, indeed the column has a fixed size, but if the String that i'm putting in it is to large for that size... It ignores the size of the column and keeps printing on the page.
    There is not way of making the text to be fit on the size? This size is only restrict in terms of width, so the text could split in a vertical way.

    Thank you so much,
    Best Regards.

  • allanallan Posts: 61,726Questions: 1Answers: 10,110 Site admin

    table-layout: fixed; is the only way to do that as far as I am aware. Or possibly to use a div wrapper element around your content and force that to be a fixed width.

    Allan

This discussion has been closed.