Hello,

I'd like to be able to use CSS to control column widths with Matrix field, mainly in the form display when content is created.

I've looked at the code, and I see where the display table is rendered, but not the form entry table. I'm a PHP novice, so is it possible for someone to tell me where I might be able to find the relevant code so I can modify it so that it will output CSS entries I can use on a TD basis?

Thanks!

Comments

Steel Rat’s picture

Any help at all on this?

Thanks!

MBroberg’s picture

+1 for this feature - I am using the matrix for a text-based chart which will vary in width for each column. I can see no difference in html tags for column headers although each box in the grid has its own 3-part code. If I change the width of any one box it will change the whole column, but not neatly.
It would be nice to be able to set the width of each column in the same place where we label the column headers, but until then some code help would be nice.

aaron1234nz’s picture

Status: Active » Fixed

Added CSS classes class="matrix-column-$i matrix-row-$j matrix-cell-$i-$j" to each cell so that the cells can be modified on a column-by-column, row-by-row, or cell-by-cell basis.

Steel Rat’s picture

Thanks very much for the reply and update! I haven't looked at it yet, but will this allow CSS control over the input form as well as the output display?

Thanks!

aaron1234nz’s picture

I've just committed another change to add CSS to the node view page as well. I'll do a stable release in about a week once I've worked through some other issues in the queue.

aaron1234nz’s picture

Version: 6.x-1.4 » 6.x-2.x-dev
Status: Fixed » Patch (to be ported)

This should be applied to the 2.x version too.

intrafusion’s picture

Status: Patch (to be ported) » Closed (won't fix)

Marking as Closed (won't fix) as the new co-maintainer will be focusing on D7