[We are using Confluence 6.8.1]
Prerequisite: Confluence HTML macro.
You can do all kinds of things with simple css in an HTML macro
<style>
div.jira-issues table td { padding: 4px 10px !important; } div.jira-issues table th { white-space: nowrap; } div.jira-issues table td:not(:last-child) { white-space: nowrap; } div.jira-issues table th:last-child { width: 50% !important; } div.jira-issues table tr.rowAlternate { background: #F3F5F7 !important; } </style>
You would need to add a javascript section to apply specific widths based on the name of the column and that's problematic since the macro load time is delayed and there is not AJS trigger to let you know when a specific Jira Issues macro is fully loaded. However, if you are ok explicitly specifying the columns by number, then you can accomplish it easily with
I'm using !important just so that I win a specificity battle with the confluence/macro-native css definitions. It may not be necessary.
<style>
div.jira-issues table th:nth-child(1) { width: 10%; }
div.jira-issues table th:nth-child(2) { width: 200px; }
div.jira-issues table th:nth-child(3) { width: 30%; }
</style>
If you need to have different once for different Jira macros, then you'll need to put HTML macros above and below each Jira issue macro with <div id="issue-macro-1"> and </div> then prefix the above lines in the <script> with #issue-macro-1. e.g.,
#issue-macro-1 div.jira-issues table th:nth-child(1) { width: 50%; }
issue-macro-1 can be any string you want and you can have as many different ones as you like.
Confluence 6.13.4
To build off of David May's post. We had to target a specific class and not just the table:
You can still specify a specific Jira issues macro like David mentioned if you'd like:
Just remember to place the HTML macros around your Jira Issues macro:
<div id="issue-macro-1">
<JIRA ISSUES MACRO>