Difference between revisions of "Template:Rotate Cell"
From MansunWiki
(Created page with "<includeonly><cleanspace> {{#inherit:ns_base}} {{#local:content|{{{1}}}}} {{#local:angle|{{{2|-90}}}}} {{#local:valign|{{{3|bottom}}}}} </cleanspace>style="vertical-align: {{{...") |
m |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly><cleanspace> | <includeonly><cleanspace> | ||
− | + | {{{1}}}}} | |
− | + | {{{2|-90}}}}} | |
− | + | {{{3|bottom}}}}} | |
− | + | </cleanspace>style="vertical-align: {{{3}}}; height: 100px;" |<div style="width:16px">{{rotate|{{{2}}}|{{{1}}}}}</div></includeonly><noinclude> | |
− | </cleanspace>style="vertical-align: {{{ | + | |
{{Documentation}} | {{Documentation}} | ||
</noinclude> | </noinclude> |
Latest revision as of 19:13, 16 August 2015
This documentation is transcluded from Template:Rotate Cell/doc. (edit | history)
Note to editors: Please don't categorize this template by editing it directly. Instead, place the category in its documentation page, in its "includeonly" section.
Note to editors: Please don't categorize this template by editing it directly. Instead, place the category in its documentation page, in its "includeonly" section.
Experimental!!
Contents
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 |