Jump to content

Template:Container

From Wikibooks, open books for an open world
{{{1}}}


Use and Options

[edit source]

Makes an invisible container to hold coloured bullet strips. Needed to ensure that short bullet texts nonetheless still fill the space. Used with Lul and Dul to make the bullet strips. For full page widths or when the amount of text is sufficient to form more than one line for every bullet point, use Lightul and Darkul without a container, in a stack.

Example1

[edit source]
  
 {{block|ta=left|1=<poem>
 [[image:gerbera_pink.jpg|200px|thumb|right|Gerbera]]
 {{Container|1=
 {{dul|Short text}}
 {{lul|{{text}}}}
 {{dul|{{lorem}}}}
 }}</poem>}}
  



Gerbera


  • Short text


  • 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.


  • Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.


gives;

Gerbera
  • Short text
  • 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.
  • Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.


Example2

[edit source]
whereas in contrast,
with no container, but still using the {{Block}} call nesting around <poem> ... </poem> formatting:
  
 {{block|ta=left|1=<poem>
 [[image:gerbera_pink.jpg|200px|thumb|right|Gerbera]]

 {{dul|Short text}}
 {{lul|{{text}}}}
 {{dul|{{lorem}}}}
 </poem>}}
  



Gerbera


  • Short text


  • 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.


  • Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.


gives;

Gerbera
  • Short text
  • 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.
  • Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.


... which on first look... would seem to be identical. On the gross level of this simple page flow, that is true. But 'container' will isolate presentations from the undesirable invasion by other sorts of page html elements in the hurly-burly of the different ways browsers assemble pages.

  • With container there is an invisible protective html wrapper not seen in either of the above examples, and an adamant clear in the termination protecting the turf of the 'container tribe'. (At least they let us stay on the Island!)


 <table align={{{align|{{{left}}} }}} cellpadding=0 border=0 
  <nowiki>  style="border-collapse:collapse;margin:5px none none none;
      background:transparent;width:{{{width|auto}}}"> 
 <td>{{{content|{{{1}}} }}}</td>

  <nowiki></table> 
 <br clear=all> 


Options

[edit source]
align
left, center, or right for the container wrapper and contents it bounds.
width
defaults to auto, sets container width.
content
|content= will override positional parameter-1 |1= arguments, ... for such duality of legal inputs are template features to enable editors to easily toggle back and forth in previews to see the 'best' content text formation and grouping for the task at hand (just misspell 'content=' deliberately s.a. for example adding a glyph: '|content2=', and '|1=' becomes active instead!
[How shalleth we phrase thee sweet text? Leteth us count the ways...])


See companion templates...
  • Use {{Lul}} and {{Dul}} to make the bullet strips.
  • Use {{Lightul}} and {{Darkul}} without a container, in a stack for full page widths or when the amount of text is sufficient to form more than one line for every bullet point.
  • Use {{container}} to include and bound combinations of the above listed beside an image.