How can i set margin for columns or space between columns?

Tags: #<Tag:0x00007fd2c14a1fc8>


I have a requirement in which we have removed the left and right side border and want to add margin for the columns or space between columns.
Can you please help me how can i achieve this?
Also when the user tries to change any value, then the selected cell takes complete width (of screen).
how can i restrict it to column width.
I have not set fixed width for columns.

Thanks in Advance.

Can you share a draft or a drawing @kbharambe?

Hi, Please find the below image.
I want to set margin-left and margin-right as 20px for columns.
and i have not set fixed width for columns

The columns are as wide as the content in the widest cell of this column when you do not use colWidths. by default the column header is centralized.

Yes, that is the requirement for now, Plus i need to add 40px space between them

It could be really hard to add space between the columns. It’s a HTML TABLE element and the TD are one after another. Even if you remove the border and get

after selection you’ll see that cells are attached to each other

Ok, thanks for your reply,
Can we increase the width of the cell / td by adding padding or margin (but not keeping column width fix). like ‘content_width + 40px’.
It’s ok if we see that cells are attached to each other after selection.

Sorry checked the fiddle this can solve the issue…
Thanks for your help :slight_smile:

That’s great news! I’m happy to help.