If I have two or more GRID's on one page, it generates for each grid a multicolumn tables (first column of each table with the questions, the other columns for each of the options). But the first column for each grid has a different width, resulting in an ugly layout. I would like to have two controls for that :
First, could it be possible to add a field to GRID where I can specify the width in % for the first column? If left blanc the system could do what it does now, but by specifying this first column I could make all grid's on one page look the same.
Secondly, I would like to have a checkbox to make the remaining columns equally spaced. So, if I specify the 35% width for the first column, and I have 3 options, the remaining columns should be (100-35)/3 % in width. E.g. specify the first two of them at 22% and leave the last column unspecified.

Also : the option buttons in the grid columns are not centered in the column. This should be, but once the columns have a controlled width, this is a minor layout issue.

Thanks.

Comments

Amir Simantov’s picture

This is very needed - and more - adding css classes not only to th but also to td in the grid.

pimousse98’s picture

Subscribe. I've been looking through the webform code and cannot find a clear location where that would be set. _webform_render_grid in grid.inc seems to attempt adding a prefix & suffix to each question with some css classes (row; ca. line 120) but those are never output. Has anyone figured this one out?

Alternately, the questions should be in a "th" cell instead of a td cell so that css could be used to control the td width without affecting the size of the question column.

quicksketch’s picture

Status: Active » Closed (won't fix)

This probably won't be changed through the Webform interface. However I'm plenty happy to add classes per Amir's suggestion over in #554294: Add CSS classes to cells in grid.