Template:Rotate Cell

From MansunWiki
Jump to: navigation, search
[view] [edit] [history] [purge] Template-info.svg Template Documentation

Experimental!!

Summary

Renders a table cell (or header) vertically, at either +90 or -90 degrees with work-arounds for a quirky version of Firefox -- still very wip! This has not yet been tested on Opera, IE or Chrome.

Paramters

1|required|Content 2|optional|Angle (default is -90). 3|optional|Vertical alignment (default is "bottom"). See also CSS vertical-align.


Caveats

  • As a hack for Firefox (at least v17.0.2 on Gentoo GNU/Linux), I'm using a hard coded width of 16px and height of 100px to keep the vertical text from completely overlapping the cells above them, as this version of firefox is incorrectly inheriting the size of a div that has been rotated. I hope we can figure something else out that's cleaner.

Example

{{Template:Rotate Cell|Hello World|90|top}}
<cleanspace>

Hello World}} 90}} top}}

</cleanspace>style="vertical-align: top; height: 100px;" |
none
Hello World
{{Template:Rotate Cell|Goodbye cruel world!}}
<cleanspace>

Goodbye cruel world!}} -90}} bottom}}

</cleanspace>style="vertical-align: {{{3}}}; height: 100px;" |
none
Goodbye cruel world!
{{Template:Rotate Cell|Hello Again|42|middle}}
<cleanspace>

Hello Again}} 42}} middle}}

</cleanspace>style="vertical-align: middle; height: 100px;" |
none
Hello Again