Is there any way to create vertical table headings in confluence?
I have created user macro but it is not working.
here's the code.
## Macro: rotate-table-headers
## Macro title: A macro for rotating all the headers in a table
## Macro has a body: Y
## Body processing: n/a
## Output: HTML
##
## Developed by: David Simpson <david@davidsimpson.me>
## Date created: 2013-11-20
## Installed by: My Name
## @param height:title=Height|type=string|required=true|desc=e.g.100px
<style>
/** @see: http://css-tricks.com/snippets/css/text-rotation/ */
.rotate-headers th div.tablesorter-header-inner {
-webkit-transform: rotate(-90deg);
-moz-transform: rotate(-90deg);
-ms-transform: rotate(-90deg);
-o-transform: rotate(-90deg);
transform: rotate(-90deg);
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3); /* Internet Explorer */
}
.rotate-headers th {
vertical-align:middle;
height: $paramheight;
}
</style>
<div class="rotate-headers">$body</div>
Hello ps41,
I was able to create a user macro using your example,
in the macro definition i used Unrendered ::
I added the following html to the user macro body:
<table style="width:100%">
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Age</th>
</tr>
<tr>
<td>Jill</td>
<td>Smith</td>
<td>50</td>
</tr>
<tr>
<td>Eve</td>
<td>Jackson</td>
<td>94</td>
</tr>
</table>
and I got this:
the text has rotated for me.. looks like all we need now is to figure out how to rotate the cells!
Hello Dee,
Thanks for your replay..!
If we add the HTML table in user macro body then it is working but we want to change the existing table header to vertical.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
## Macro title: My Macro
## Macro has a body: Y
## Body processing: Selected body processing option
## Output: Selected output option
##
## Developed by: My Name
## Date created: dd/mm/yyyy
## Installed by: My Name
## This is an example macro
## @param Name:title=Name|type=string|required=true|desc=Your name
## @param Colour:title=Favourite Colour|type=enum|enumValues=red,green,blue|default=red|desc=Choose your favourite colour
<style>
.confluenceTable .confluenceTh {
position: relative;
}
.confluenceTable .confluenceTh strong {
writing-mode: vertical-rl;transform: rotate(180deg);white-space: nowrap;display: inline-block;overflow: visible;
}
</style>
Give that a shot, to make the titles vertical you need to bold them.
Note: This macro has no body and will affect all tables, row and column headers that have been bolded.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.