Template:Left/doc: Difference between revisions

From escforumwiki
Jump to navigation Jump to search
en>Epicgenius
(Created page with '{{Documentation subpage}} <!-- Categories go at the bottom of this page and interwikis go in Wikidata. --> == Usage == This template saves typing the following...')
 
m (20 revisions imported)
 
(19 intermediate revisions by 11 users not shown)
Line 1: Line 1:
{{Documentation subpage}}
{{Documentation subpage}}
<!-- Categories go at the bottom of this page and interwikis go in 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>
With an input argument, it saves typing:
: <code><nowiki>&lt;div style="float:left;">...</div&gt;</nowiki></code>


<nowiki>Some {{left|left-aligned words}} in text</nowiki>
To use, type <code><nowiki>{{left|content}}</nowiki></code> to align contents.
produces:<br/>
Some {{left|left-aligned words}} in text.


===Table===
== Examples ==
{| class="wikitable" width=300px
=== Example 1 ===
!colspan="3"| Header text
{{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}}Left || {{Center|Center}} || {{Right|Right}}
| {{Left}} Content1A <br/> Content1B || Content2
|}
|}
{{col-end}}
=== Example 2 ===
{{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}}
==TemplateData==
<templatedata>
{
"params": {
"1": {
"label": "Content",
"description": "Content to be left aligned",
"type": "content",
"required": true
}
},
"description": "Left aligns elements on a page"
}
</templatedata>
==Tracking category==
* {{clc|Pages using left with no arguments}}


== See also ==
== See also ==
* {{tl|align}}
* {{tl|center}}, {{tl|right}} and {{tl|justify}}
* {{tl|Center block}}
* {{tl|Image frame}}


*{{tl|left2}} - same as this, uses div tags instead of modifying cell properties
<includeonly>{{sandbox other||
*{{tl|center}}
<!-- Add categories below this line, and interwikis at Wikidata -->
*{{tl|right}}
[[Category:Positioning templates]]
 
[[Category:Typing-aid templates]]
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
<!-- Categories go here and interwikis go in Wikidata. -->
[[Category:typing-aid templates|Left]]
[[Category:Wikipedia formatting and function templates|Left]]
}}</includeonly>
}}</includeonly>

Latest revision as of 18:25, 12 June 2022

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

TemplateData

Left aligns elements on a page

Template parameters

ParameterDescriptionTypeStatus
Content1

Content to be left aligned

Contentrequired

Tracking category

See also