table - Forum | JoomShaper
Staff replied SP Page Builder

table

Asked by Taco Hoppener 2 years ago Last activity 2 years ago

Good day,
I've asked before. I have a table with 3 columns and I want column 1 to be 30% wide, column 2 to be 30% and column 3 to be 60% wide. how can I arrange that? or what is the custom css

4 replies

Paul Frankowski Senior Staff

Hi Taco.

If table is built using HTML (classic method) , just add add style for <th>

<th style="width:30%">

etc.

Taco Hoppener Asked this

I created the table with addon.

Paul Frankowski Senior Staff

Indeed by settings, probably it's not possible, only by Custom CSS.

Paul Frankowski Senior Staff
2 years ago · edited

On that page where you have that Table in Page Settings > Page CSS > Custom CSS area paste:

.sppb-addon-table thead > tr > th:nth-of-type(1) {width: 30%;}
.sppb-addon-table thead > tr > th:nth-of-type(2) {width: 30%;}
.sppb-addon-table thead > tr > th:nth-of-type(3) {width: 60%;}

info_3057_2024.gif

In theory should work in Desktop view, if you have Header for Table :)

if not, try that:

.sppb-addon-table tbody > tr > th:nth-of-type(1) {width: 30%;}
.sppb-addon-table tbody > tr > th:nth-of-type(2) {width: 30%;}
.sppb-addon-table tbody > tr > th:nth-of-type(3) {width: 60%;}
Log in to reply.