-
darcie.vaughanAsked on May 13, 2022 at 7:34 PM
Hi!
I would like to be able to resize my columns individually - meaning, I would like them to be different widths. Can you provide me with the CSS for this? The form I am working on is this one which has different table so I need the CSS to be 'generic' where I can adjust the width as needed. Thanks!
-
Sigit JotForm SupportReplied on May 13, 2022 at 9:32 PM
Hello Darcie,
Thank you for contacting Jotform Support. It is possible to adjust the width of all table columns, this CSS code will apply to all tables on the form:
tr th:first-child{
width: 20%;
min-width: 20px;
}
tr th:nth-child(2){
width: 10%; min-width: 10px;
}
tr th:nth-child(3){
width: 10 min-width: 10px;
}
tr th:nth-child(4){
width: 10%; min-width: 10px;
}
tr th:nth-child(5){
width: 50%; min-width: 50px;
}
To target a specific table, add the #cid_XX > table in front.
If you need further assistance, please let us know.
-
Sigit JotForm SupportReplied on May 13, 2022 at 9:43 PM
Hello Darcie,
In regard to the workaround that we discussed earlier today, here's an example when the CSS code applied on the 2. Potential Parties table, as shown in the screencast below:
#cid_11 > table > tbody > tr th:first-child{
width: 20%;
min-width: 20px;
}
If you need further assistance, please let us know.
-
darcie.vaughanReplied on May 14, 2022 at 1:25 PM
so to make the address column wider, would that be 'fourth-child'?
-
Sigit JotForm SupportReplied on May 14, 2022 at 2:24 PM
Hello Darcie,
Thank you for getting back to us. Kindly allow me some time to check and will get back to you as soon as possible.
Thank you for your patience and understanding.
-
Sigit JotForm SupportReplied on May 14, 2022 at 3:13 PM
Hello Darcie,
Thank you for your patience. To make the Potential Parties - Input Table - address column wider, please inject the following CSS code as shown in the screencast below:
CSS code:
/*header*/
#id_11 .form-matrix-th {
width: 100px !important;
}
/*Full Name*/
#id_11 .form-matrix-column_0 {
width: 180px !important;
}
/*Phone*/
#id_11 .form-matrix-column_1 {
width: 180px !important;
}
/*Address*/
#id_11 .form-matrix-column_2 {
width: 280px !important;
}
If you need further assistance, please let us know.