ထႅမ်းပလဵတ်ႉ:Float
ၶေႃႈသပ်းလႅင်း
[မႄးထတ်းငဝ်ႈငႃႇ]It is used to position text or elements to the rightmost/leftmost of a page/area, without changing the alignment or formatting of other text and elements nearby.
For aligning text in general, see {{align}}. For floating images, boxes, and other elements, see {{stack}}.
လွင်ႈၸႂ်ႉတိုဝ်း
[မႄးထတ်းငဝ်ႈငႃႇ]These are the standard usage:
{{float|item}}
floats item on the rightmost of a page/area.{{float|left|item}}
floats item on the leftmost of a page/area.
More configuration:
{{float |width= |height= |top= |right= |bottom= |left= |item}}
item
is required. You must specify what text or element to float or it will throw an error.
All parameters are optional. The parameters |width=
and |height=
are to indicate the width/height of the <div>
element.
The optional parameters |top=
, |right=
, |bottom=
and |left=
are to indicate how far from their respective positions the item is to be positioned.
Any established HTML/CSS units may be used, for example, {{float |top=2.0em |left=2px |width=10em | the content to float}}
.
Beware
[မႄးထတ်းငဝ်ႈငႃႇ]Beware when using this template in navboxes. Please ensure whatever it floats (e.g. an image) does not float over other elements or text, even after the navbox is resized.
To align centered lists in a navbox with an image, see the alternatives for navigational boxes section below.
တူဝ်ယၢင်ႇ
[မႄးထတ်းငဝ်ႈငႃႇ]Note how the links in the second two examples are centered relative to the whole template, unlike those in the first example.
Example 1 (without float)
[မႄးထတ်းငဝ်ႈငႃႇ]This is a navbox using its image parameter:
{{Navbox | name = Float/doc | state = uncollapsed | title = [[Imperial Japanese Navy]] | listclass = hlist | image = [[File:Naval Ensign of Japan.svg|24px|border|Naval Ensign of Japan]] | list1 = * [[Imperial Japanese Navy admirals|Admirals]] * [[Battles of the Imperial Japanese Navy|Battles]] * [[List of ships of the Japanese Navy|Ships]] * [[List of aircraft of the Japanese Navy|Aircraft]] * [[List of weapons of the Japanese Navy|Weapons]] }}
Example 2 (with float)
[မႄးထတ်းငဝ်ႈငႃႇ]We use {{float}} instead of the navbox's image parameter:
{{Navbox | name = Float/doc | state = uncollapsed | title = [[Imperial Japanese Navy]] | listclass = hlist | list1 = {{float|[[File:Naval Ensign of Japan.svg|24px|border|Naval Ensign of Japan]]}} * [[Imperial Japanese Navy admirals|Admirals]] * [[Battles of the Imperial Japanese Navy|Battles]] * [[List of ships of the Japanese Navy|Ships]] * [[List of aircraft of the Japanese Navy|Aircraft]] * [[List of weapons of the Japanese Navy|Weapons]] }}
Example 3 (with float and custom values)
[မႄးထတ်းငဝ်ႈငႃႇ]We use {{float}} with a custom value of |top=
this time:
{{Navbox | name = Float/doc | state = uncollapsed | title = [[Imperial Japanese Navy]] | listclass = hlist | list1 = {{float|top=0.5em|[[File:Naval Ensign of Japan.svg|24px|border|Naval Ensign of Japan]]}} * [[Imperial Japanese Navy admirals|Admirals]] * [[Battles of the Imperial Japanese Navy|Battles]] * [[List of ships of the Japanese Navy|Ships]] * [[List of aircraft of the Japanese Navy|Aircraft]] * [[List of weapons of the Japanese Navy|Weapons]] }}
Alternatives for navigational boxes
[မႄးထတ်းငဝ်ႈငႃႇ]We use its image parameter and liststyle with padding-left set to the image width:
{{Navbox | name = Float/doc | state = uncollapsed | title = [[Imperial Japanese Navy]] | listclass = hlist | image = [[File:Naval Ensign of Japan.svg|24px|border|Naval Ensign of Japan]] | liststyle = padding-left: 24px | list1 = * [[Imperial Japanese Navy admirals|Admirals]] * [[Battles of the Imperial Japanese Navy|Battles]] * [[List of ships of the Japanese Navy|Ships]] * [[List of aircraft of the Japanese Navy|Aircraft]] * [[List of weapons of the Japanese Navy|Weapons]] }}
တူၺ်းပႃး
[မႄးထတ်းငဝ်ႈငႃႇ]- {{align}}
- {{clear}}
- {{float begin}} and {{float end}} - Places wikicode in an image frame. Allows captions. Handles wikitables without having to use escape characters.
- {{stack}}
ၽိုၼ်ၵႅမ်မိုဝ်းလၢႆးၸႂ်ႉတိုဝ်း (documentation)တီႈၽၢႆႇၼိူဝ်ၼႆႉ လုၵ်ႉတီႈ ထႅမ်းပလဵတ်ႉ:Float/doc သေ ၶၢႆႉသႂ်ႇၶဝ်ႈ (ႁဵတ်း transclude ဝႆႉၶႃႈဢေႃႈ။ (မႄးထတ်း | ပိုၼ်း) ၽူႈၸိူဝ်းမႄးထတ်းၶဝ် ၸၢင်ႈၸၢမ်းတူၺ်းလႆႈ ၸိူဝ်းပဵၼ်ၼႃႈလိၵ်ႈ sandbox (သၢင်ႈ | ငဝ်းမိူၼ်) လႄႈ testcases (သၢင်ႈ) ႁင်း ထႅမ်းပလဵတ်ႉဢၼ်ၼႆႉ လႆႈယူႇၶႃႈ။ သႂ်ႇပိူင်ထၢၼ်ႈ ၵႃႈတီႈ ၼႃႈလိၵ်ႈၽႄ /doc လႄႈ။ ၼႃႈလိၵ်ႈၽႄ ႁင်း ထႅမ်းပလဵတ်ႉ ဢၼ်ၼႆႉ။. |