0

When working with cases, the subject field of the activities in the case is commonly set by users. When they enter a subject that is longer than about 30 characters, the display of the entire case, when viewed using the "Manage Case' page (/civicrm/contact/view/case?reset=1&id=X&cid=Y&action=view&context=case&selectedChild=case) is broken, in that the table used to list all of the activities extends to the right of the enclosing div, making the whole thing look messy.

Thinking that maybe I could make some CSS edits to set the table-layout: fixed; and use overflow-wrap to wrap the subject text in its cell, I found that this didn't work, I think because the table element has a numerical width attribute coded in, which looks to be different depending on which case I'm looking at.

Why is the table being created with a width value being set by Civi? Wouldn't it make more sense for this table to be a fixed width so that it displays reliably within the broader page structure, and instead force the text in the subject cell to wrap?

How to begin changing this?

1

I don't know offhand why there's a hardcoded width, but you could try something like

div.crm-case-caseview-form-block table.nestedActivitySelector { width: auto; }

to override the width setting?

  • On closer inspection cell width appears to be coded in for each column in the table. What seems most odd is that the text in the 'Subject' column isn't wrapping, where it looks like it is in other columns. – Graham Dec 19 '16 at 7:47
  • Seems to wrap on the public demo. What version are you on? Is there any css override coming from elsewhere? – Demerit Dec 20 '16 at 19:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.