Help adjust the width of the columns in input table.

  • Emerald_Carrying_Co
    Asked on December 9, 2020 at 4:35 AM

    Hi

    I have an Input Table in which I wish to control the width of the columns individually to avoid the user having scroll the table to the right to see the last field.

    I have the following field id's:

    #input_98_0_0, #input_98_0_1, #input_98_0_2, #input_98_0_3, #input_98_0_4, #input_98_0_5, #input_98_1_0, #input_98_1_1, #input_98_1_2, #input_98_1_3, #input_98_1_4, #input_98_1_5, #input_98_2_0, #input_98_2_1, #input_98_2_2, #input_98_2_3, #input_98_2_4, #input_98_2_5,

    and so on.

    I want set the width of columns 2,3,4 & 5

    Can you please help with the CSS code to do this ?

    Thanks in advance

  • Jed_C
    Replied on December 9, 2020 at 5:27 AM

    Please refer to the CSS below for each column.

    Column #2: 

    #cid_98 > table > tbody > tr:nth-child(2) > td:nth-child(3) {
      width: 10px;
    }

    Column #3:

    #cid_98 > table > tbody > tr:nth-child(2) > td:nth-child(4) {
      width: 10px;
    }

    Column #4:

    #cid_98 > table > tbody > tr:nth-child(2) > td:nth-child(5) {
      width: 10px;
    }

    Column #5: 

    #cid_98 > table > tbody > tr:nth-child(2) > td:nth-child(6) {
      width: 10px;
    }

    Just replace the pixel of the width to your preferred size.

    Guide: https://www.jotform.com/help/117-How-to-Inject-Custom-CSS-Codes