Template:Thetop
{{{1}}} | {{{2}}} | {{{3}}} |
Uses, Limitations, Parameters and Options
editUses
editIntended to make a top section for a Wikibooks page so that the Table of Contents,(TOC), a block of text, and an image can line up horizontally. Options allow multi-use of the three spaces. This avoids the white space which usually results to the side of the TOC.
The template merges well, edge to edge, with another instance of the template following it. Simply avoid any line breaks between the calls.
A wide range of options is given.
It is called as follows:
Limitations
editCare must be taken to distinguish between the number 'one' and the lower case of the letter L.
Note that the widths are defaulted to percentage values, and that these units make sense only when the cell widths add to 100%.
The Table in a Template Problem
editThe template suffers from the usual problems when a wikitext table is used. The method found to work for tables used as parameters is as follows:
- Make an HTML table from the wikitext table.
- Remove any cellspacing attribute from the table and a CSS style for spacing.
- Use a numbered or named parameter.
- Remove the wikitext apostrophe code headings and replace them with the HTML tag equivalents.
Note that the leader and trailer parameters must be named, and are lower case spellings. They do not use numbered parameters. Line height could not be provided since it works only in a block element. Use a text span if it is needed.
Parameters
editThere are five parameters:
- leader
- fills a full width of the page at the top. Must be named.
- 1 , theleft
- is the leftmost of three cells in a row
- 2 , themiddle
- is the middle cell of the three cells
- 3 , theright
- is the rightmost cell of the three
- trailer
- fills a full width of the page at the bottom. Must be named.
This is the 'leader' It wraps text in the top section, all the way across the page. If it is used, it must be named. If it is not used, it just collapses and is unseen. The time has come for all good men to come to the aid of the party. The quick brown fox jumps over the lazy dog 0123456789 times. Of all the fishes in the sea the mermaid is the one for me. Peter Piper picked a pot of pickled pepper. The Leith police inhibiteth us. |
||
This is 'theleft'. It has a default width of 25%. The time has come for all good men to come to the aid of the party. The quick brown fox jumps over the lazy dog 0123456789 times. Of all the fishes in the sea the mermaid is the one for me. Peter Piper picked a pot of pickled pepper. The Leith police inhibiteth us. |
This is 'themiddle'. It has a default width of 50%.The time has come for all good men to come to the aid of the party. The quick brown fox jumps over the lazy dog 0123456789 times. Of all the fishes in the sea the mermaid is the one for me. Peter Piper picked a pot of pickled pepper. The Leith police inhibiteth us.The time has come for all good men to come to the aid of the party. The quick brown fox jumps over the lazy dog 0123456789 times. Of all the fishes in the sea the mermaid is the one for me. Peter Piper picked a pot of pickled pepper. The Leith police inhibiteth us. |
This is 'theright'. It has a default width of 25%. The time has come for all good men to come to the aid of the party. The quick brown fox jumps over the lazy dog 0123456789 times. Of all the fishes in the sea the mermaid is the one for me. Peter Piper picked a pot of pickled pepper. The Leith police inhibiteth us. |
This is the 'trailer'. It wraps text in the bottom section all the way across the page. If it is used, it must be named. If it is not used, it just collapses and is unseen. The time has come for all good men to come to the aid of the party. The quick brown fox jumps over the lazy dog 0123456789 times. Of all the fishes in the sea the mermaid is the one for me. Peter Piper picked a pot of pickled pepper. The Leith police inhibiteth us. |
The leader and trailer need not be used, while the three others will signify any omission.
Options
editAn excess of options has been added.
Container:
edit- br
- Table perimeter border, defaults to 1px solid lightgrey
- bd
- Table background color, defaults to transparent
- cs
- cellspacing, defaults to 5px, for collapsed state enter cs=0
- cp
- Table cell padding, default zero, overridden by local cell padding.
- m
- Table margin, defaults to zero
- w
- Table width, defaults to 100%
Parameter:leader (must be named)
edit- ffle
- font-family,inherit
- fsle
- font-size, inherit
- fcle
- text color,inherit
- vale
- vertical alignment, defaults to top
- hale
- horizontal alignment, defaults to left
- cple
- padding, defaults to 0 5px 5px 5px
- wle
- width, defaults to 100%
- brle
- border, defaults to none
- bdle
- background color, defaults to transparent
Parameter:1 or theleft
edit- ff1
- font-family,inherit
- fs1
- font-size, inherit
- fc1
- text color,inherit
- va1
- vertical alignment, defaults to top
- ha1
- horizontal alignment, defaults to left
- cp1
- padding, defaults to 0 5px 5px 5px
- w1
- width, defaults to 25%
- br1
- border, defaults to none
- bd1
- background color, defaults to transparent
Parameter:2 or themiddle
edit- ff2
- font-family,inherit
- fs2
- font-size, inherit
- fc2
- text color,inherit
- va2
- vertical alignment, defaults to top
- ha2
- horizontal alignment, defaults to left
- cp2
- padding, defaults to 0 5px 5px 5px
- w2
- width, defaults to 50%
- br2
- border, defaults to none
- bd2
- background color, defaults to transparent
Parameter:3 or theright
edit- ff3
- font-family,inherit
- fs3
- font-size, inherit
- fc3
- text color,inherit
- va3
- vertical alignment, defaults to top
- ha3
- horizontal alignment, defaults to left
- cp3
- padding, defaults to 0 5px 5px 5px
- w3
- width, defaults to 25%
- br3
- border, defaults to none
- bd3
- background color, defaults to transparent
Parameter:trailer (must be named)
edit- fft
- font-family,inherit
- fst
- font-size, inherit
- fct
- text color,inherit
- vat
- vertical alignment, defaults to top
- hat
- horizontal alignment, defaults to left
- cpt
- padding, defaults to 0 5px 5px 5px
- wt
- width, defaults to 100%
- brt
- border, defaults to none
- bdt
- background color, defaults to transparent