Difference between revisions of "Template:Left/doc"

From blackwiki
Jump to navigation Jump to search
imported>Frietjes
imported>Funandtrvl
(update info)
 
(11 intermediate revisions by 8 users not shown)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
<!-- Categories at the bottom of this page, please; interwikis to Wikidata. -->
+
<!-- Please add categories at the bottom of this page, and interwikis at Wikidata (see Wikipedia:Wikidata) -->
 +
{{High-use}}
 +
 
 +
== Description ==
 +
It is to '''left''' align elements on a page. The only parameter is the content to be aligned. See also [[Template:Align]] for more options and flexibility.
  
 
== Usage ==
 
== Usage ==
This template saves typing the following text (in a table):
+
With no input arguments, it saves typing the following text (in a table):
 +
: <code><nowiki>style="text-align:left"|</nowiki></code>
  
<code><nowiki>style="text-align:left"|</nowiki></code>
+
To use, type <code><nowiki>{{left}}</nowiki></code> at the start of the table cell. It will leave [[:Category:Pages using left with no arguments]].
  
To use, type: <code><nowiki>{{left}}</nowiki></code> at the start of the table cell.
+
With an input argument, it saves typing:
 +
: <code><nowiki>&lt;div style="float:left;">...</div&gt;</nowiki></code>
 +
 
 +
To use, type <code><nowiki>{{left|content}}</nowiki></code> to align contents.
 +
 
 +
== Examples ==
 +
=== Example 1 ===
 +
{{col-begin}}
 +
{{col-break}}
 +
<pre style="overflow:auto">
 +
{| class="wikitable" style="width:30em; text-align:center"
 +
!colspan="4"| Header text
 +
|-
 +
| {{Left}} Content1A <br/> Content1B || Content2
 +
|}
 +
</pre>
 +
{{col-break|gap=2em}}
 +
{| class="wikitable" style="width:30em; text-align:center"
 +
!colspan="4"| Header text
 +
|-
 +
| {{Left}} Content1A <br/> Content1B || Content2
 +
|}
 +
{{col-end}}
  
===Table===
+
=== Example 2 ===
{| class="wikitable" width=300px
+
{{col-begin}}
!colspan="3"| Header text
+
{{col-break}}
 +
<pre style="overflow:auto">
 +
{| class="wikitable" style="width:30em; text-align:center"
 +
!colspan="4"| Header text
 
|-
 
|-
| {{Left}}Left || {{Center|Center}} || {{Right|Right}}
+
| {{Left|Content1A}} <br/> Content1B || Content2
 
|}
 
|}
 +
</pre>
 +
{{col-break|gap=2em}}
 +
{| class="wikitable" style="width:30em; text-align:center"
 +
!colspan="4"| Header text
 +
|-
 +
| {{Left|Content1A}} <br/> Content1B || Content2
 +
|}
 +
{{col-end}}
 +
 +
==Tracking category==
 +
* {{clc|Pages using left with no arguments}}
  
 
== See also ==
 
== See also ==
*{{tl|left2}}, which uses div tags instead of modifying cell properties.
+
* {{tl|align}}
*{{tl|center}}
+
* {{tl|center}}, {{tl|right}} and {{tl|left}}
*{{tl|right}}
+
* {{tl|float center}}, {{tl|float right}} and {{tl|float left}}
 +
* {{tl|Image frame}}
  
<includeonly>{{basepage subpage
+
<includeonly>{{sandbox other||
| <!-- Categories below this line please; interwikis to Wikidata. -->
+
<!-- Add categories below this line, and interwikis at Wikidata -->
 
[[Category:Positioning templates]]
 
[[Category:Positioning templates]]
 
[[Category:Typing-aid templates]]
 
[[Category:Typing-aid templates]]
 
}}</includeonly>
 
}}</includeonly>

Latest revision as of 00:38, 9 October 2020

Description

It is to left align elements on a page. The only parameter is the content to be aligned. See also Template:Align for more options and flexibility.

Usage

With no input arguments, it saves typing the following text (in a table):

style="text-align:left"|

To use, type {{left}} at the start of the table cell. It will leave Category:Pages using left with no arguments.

With an input argument, it saves typing:

<div style="float:left;">...</div>

To use, type {{left|content}} to align contents.

Examples

Example 1

Example 2

Tracking category

See also