Template:Zfloat left/doc

From Wikisource
Jump to navigation Jump to search

Usage[edit]

This template floats text to the left without changing textual alignment, however (unlike {{float left}}) the remaining text on the page is overlaid as if the floated text is not present at all. This permits such effects as:

{{zfloat left|{{nowrap|'''This text is floated left with no offset.'''}}}}{{centre|''This text is truly centred.''}}

which yields


This text is floated left with no offset.

This text is truly centred.

whereas (traditional approach):

{{float left|'''This text is floated left.'''}}{{centre|''This text is '''not''' truly centred.''}}

yields


This text is floated left.

This text is not truly centred.

Limitations[edit]

  • If insufficient display width is available, the text blocks will overlap with the result likely to be quite unreadable.
  • It will normally be necessary to take measures as above to suppress white-space wrapping (e.g. {{nowrap}}) in the floated text.

Parameters[edit]

  • left: Specify left margin offset (default is 0)
  • top: Specify specify vertical offset (default 1em, which normally results in level alignment with first line of following text)

See also[edit]