Шаблон:Div col/док — разлика између измена
| [непроверена измена] | [непроверена измена] |
Нема описа измене |
м (1 измена увезена) |
||
| (Једна међуизмена истог корисника није приказана) | |||
| Ред 1: | Ред 1: | ||
<!----------------------------------------------------------------------------- | <!----------------------------------------------------------------------------- | ||
PLEASE ADD CATEGORIES WHERE INDICATED AT THE BOTTOM OF THIS PAGE | PLEASE ADD CATEGORIES WHERE INDICATED AT THE BOTTOM OF THIS PAGE | ||
------------------------------------------------------------------------------> | ------------------------------------------------------------------------------> | ||
{{ | {{Documentation subpage}} | ||
{{Ombox |type=notice |text=Columns are not supported by some older browsers, most notably Internet Explorer 9 and | {{Ombox |type=notice |text=Columns are not supported by some older browsers, most notably Internet Explorer 9 and below and Opera 11.0 and below. See [[Template:Reflist#Browser support for columns|this page]] for more information.}} | ||
{{CSS3 multiple column layout}} | {{CSS3 multiple column layout}} | ||
{{tl|Div col}}, together with {{tl|div col end}}, is used to make a list into columns. It automatically breaks each column into an equal space, meaning, for instance, it isn't necessary to work out the halfway point between two columns. The template also offers options to set a smaller (90%) font-size ({{para|small|yes}}), place vertical lines ("rules") between the columns ({{para|rules}}) and to add other custom styling ({{para|style}}). | |||
{{tl|Div col}} can create multiple columns in [[web browser]]s which support one of the following [[CSS]] properties: | |||
* ''column-count'' (for [[Cascading Style Sheets#CSS 3|CSS3]]-compliant browsers; see [http://www.w3.org/TR/css3-multicol/ CSS3 module: Multi-column layout]) | |||
* ''-moz-column-count'' (for [[Mozilla application framework|Mozilla]]/[[Gecko (layout engine)|Gecko]]-based browsers such as [[Firefox]]) | |||
* ''-webkit-column-count'' (for [[WebKit]]-based browsers such as [[Safari (web browser)|Safari]] and [[Google Chrome]]) | |||
=== | ==Usage== | ||
; {{s|{{para|cols}}}} {{nobold|or first unnamed parameter}} : ''(Now [[Deprecation|deprecated]], as ''colwidth'' below is better suited to flexible formatting for a variety of display screen sizes (from mobile phones, tablets, etc to widescreen cinema-style displays))''<br/>Specifies the number of columns (default 2). | |||
; {{para|colwidth}} {{nobold|or second unnamed parameter}} : Specifies the minimum width of the columns and determines automatically the number of columns based on screen width (i.e. more columns will be shown on wider displays). Overrides ''cols''. Specified in any CSS unit, for instance in [[Em (typography)|em]], about the width of a capital "M", e.g, <code>colwidth=20em</code> | |||
; {{para|rules}} : Adds vertical lines ("rules") between the columns if set to <code>yes</code> or some CSS styling (e.g. <code>1px dashed blue;</code>). | |||
; {{para|gap}} : Specifies the space between the content of adjacent columns. Specified in any CSS unit, e.g, <code>gap=2em</code>. The default spacing is 1em. | |||
; {{para|style}} : CSS styling to apply to the columns. | |||
==Examples== | |||
<pre> | <pre> | ||
{{ | {{Div col}} | ||
* a | * a | ||
* b | * b | ||
| Ред 38: | Ред 31: | ||
* g | * g | ||
* h | * h | ||
{{ | {{Div col end}} | ||
</pre> | </pre> | ||
; produces: | |||
{{Div col | {{Div col}} | ||
* a | * a | ||
* b | * b | ||
| Ред 52: | Ред 45: | ||
{{Div col end}} | {{Div col end}} | ||
<pre> | <pre> | ||
{{Div col| | {{Div col|3}} | ||
* a | * a | ||
* b | * b | ||
| Ред 65: | Ред 57: | ||
{{Div col end}} | {{Div col end}} | ||
</pre> | </pre> | ||
; produces: | |||
{{Div col| | {{Div col|3}} | ||
* a | * a | ||
* b | * b | ||
| Ред 77: | Ред 69: | ||
{{Div col end}} | {{Div col end}} | ||
<pre> | <pre> | ||
{{Div col| | {{Div col||10em}} | ||
* a | * a | ||
* b | * b | ||
| Ред 90: | Ред 81: | ||
{{Div col end}} | {{Div col end}} | ||
</pre> | </pre> | ||
; produces: | |||
{{Div col| | {{Div col||10em}} | ||
* a | * a | ||
* b | * b | ||
| Ред 102: | Ред 93: | ||
{{Div col end}} | {{Div col end}} | ||
<pre> | <pre> | ||
{{Div col| | {{Div col|rules=yes}} | ||
* a | * a | ||
* b | * b | ||
| Ред 115: | Ред 105: | ||
{{Div col end}} | {{Div col end}} | ||
</pre> | </pre> | ||
; produces: | |||
{{Div col| | {{Div col|rules=yes}} | ||
* a | * a | ||
* b | * b | ||
| Ред 127: | Ред 117: | ||
{{Div col end}} | {{Div col end}} | ||
<pre> | <pre> | ||
{{Div col | {{Div col|small=yes}} | ||
* a | * a | ||
* b | * b | ||
| Ред 165: | Ред 129: | ||
{{Div col end}} | {{Div col end}} | ||
</pre> | </pre> | ||
; produces: | |||
{{Div col | {{Div col|small=yes}} | ||
* a | * a | ||
* b | * b | ||
| Ред 200: | Ред 140: | ||
* h | * h | ||
{{Div col end}} | {{Div col end}} | ||
==TemplateData== | ==TemplateData== | ||
{{ | {{TemplateDataHeader}} | ||
{{#switch: {{BASEPAGENAME}} | {{#switch: {{BASEPAGENAME}} | ||
|Div col=<templatedata> | |Div col=<templatedata> | ||
{ | { | ||
"description": "Breaks a list into columns. It automatically breaks each column to an equal space, so you do not manually have to find the half way point on two columns. The list is closed with {{div col end}}.", | |||
"params": { | |||
"cols": { | |||
"label": "cols", | |||
"description": "Specifies the number of columns.", | |||
"type": "string", | |||
"default": "2", | |||
"aliases": ["1"], | |||
"required": false | |||
}, | |||
"colwidth": { | |||
"label": "colwidth", | |||
"description": "Specifies the width of columns, and determines dynamically the number of columns based on screen width; more columns will be shown on wider displays. This overrides the 'cols' setting.", | |||
"type": "string", | |||
"aliases": ["2"], | |||
"required": false | |||
}, | |||
"rules": { | |||
"label": "rules", | |||
"description": "Produces vertical rules between the columns if set to yes.", | |||
"type": "string", | |||
"required": false | |||
}, | |||
"gap": { | |||
"label": "gap", | |||
"description": "Specifies the space between the content of adjacent columns.", | |||
"type": "string", | |||
"required": false | |||
}, | |||
"style": { | |||
"label": "style", | |||
"description": "Specifies any custom styling.", | |||
"type": "string", | |||
"required": false | |||
} | |||
} | |||
} | } | ||
</templatedata> | </templatedata> | ||
| Ред 325: | Ред 194: | ||
==Redirects== | ==Redirects== | ||
* {{tl|Div col start}} | |||
* {{ | |||
}} | |||
==See also== | ==See also== | ||
{{Column-generating template families}} | {{Column-generating template families}} | ||
<includeonly>{{ | <includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | | ||
| <!-- CATEGORIES BELOW THIS LINE, PLEASE: --> | | <!-- CATEGORIES BELOW THIS LINE, PLEASE: --> | ||
[[Category: | [[Category:Table and column templates]] | ||
<!--?:-->{{#switch:{{PAGENAME}} |Div col= |Div col end=}} | <!--?:-->{{#switch:{{PAGENAME}} |Div col= |Div col end=}} | ||
[[es:Plantilla:Div col]] | |||
}}</includeonly> | }}</includeonly> | ||
Тренутна верзија на датум 5. фебруар 2021. у 16:09
Lua error: Cannot create process: proc_open(/dev/null): failed to open stream: Operation not permitted Lua error: Cannot create process: proc_open(/dev/null): failed to open stream: Operation not permitted
| Property | Internet Explorer |
Firefox | Safari | Chrome | Opera |
|---|---|---|---|---|---|
| column-width column-count |
≥ 10 (2012) |
≥ 1.5 (2005) |
≥ 3 (2007) |
≥ 1 (2008) |
≥ 11.1 (2011) |
| columns | ≥ 10 (2012) |
≥ 9 (2011) |
≥ 3 (2007) |
≥ 1 (2008) |
≥ 11.1 (2011) |
| break-before break-after break-inside |
≥ 10 (2012) |
Не | Не | Не | ≥ 11.1 (2011) |
{{Div col}}, together with {{div col end}}, is used to make a list into columns. It automatically breaks each column into an equal space, meaning, for instance, it isn't necessary to work out the halfway point between two columns. The template also offers options to set a smaller (90%) font-size (|small=yes), place vertical lines ("rules") between the columns (|rules=) and to add other custom styling (|style=).
{{Div col}} can create multiple columns in web browsers which support one of the following CSS properties:
- column-count (for CSS3-compliant browsers; see CSS3 module: Multi-column layout)
- -moz-column-count (for Mozilla/Gecko-based browsers such as Firefox)
- -webkit-column-count (for WebKit-based browsers such as Safari and Google Chrome)
Usage
or first unnamed parameter|cols=- (Now deprecated, as colwidth below is better suited to flexible formatting for a variety of display screen sizes (from mobile phones, tablets, etc to widescreen cinema-style displays))
Specifies the number of columns (default 2). |colwidth=or second unnamed parameter- Specifies the minimum width of the columns and determines automatically the number of columns based on screen width (i.e. more columns will be shown on wider displays). Overrides cols. Specified in any CSS unit, for instance in em, about the width of a capital "M", e.g,
colwidth=20em |rules=- Adds vertical lines ("rules") between the columns if set to
yesor some CSS styling (e.g.1px dashed blue;). |gap=- Specifies the space between the content of adjacent columns. Specified in any CSS unit, e.g,
gap=2em. The default spacing is 1em. |style=- CSS styling to apply to the columns.
Examples
{{Div col}}
* a
* b
* c
* d
* e
* f
* g
* h
{{Div col end}}
- produces
- a
- b
- c
- d
- e
- f
- g
- h
{{Div col|3}}
* a
* b
* c
* d
* e
* f
* g
* h
{{Div col end}}
- produces
- a
- b
- c
- d
- e
- f
- g
- h
{{Div col||10em}}
* a
* b
* c
* d
* e
* f
* g
* h
{{Div col end}}
- produces
- a
- b
- c
- d
- e
- f
- g
- h
{{Div col|rules=yes}}
* a
* b
* c
* d
* e
* f
* g
* h
{{Div col end}}
- produces
- a
- b
- c
- d
- e
- f
- g
- h
{{Div col|small=yes}}
* a
* b
* c
* d
* e
* f
* g
* h
{{Div col end}}
- produces
- a
- b
- c
- d
- e
- f
- g
- h
TemplateData
TemplateData за Div col
Breaks a list into columns. It automatically breaks each column to an equal space, so you do not manually have to find the half way point on two columns. The list is closed with {{div col end}}.
| Параметар | Опис | Врста | Статус | |
|---|---|---|---|---|
| cols | cols 1 | Specifies the number of columns.
| текст | необавезно |
| colwidth | colwidth 2 | Specifies the width of columns, and determines dynamically the number of columns based on screen width; more columns will be shown on wider displays. This overrides the 'cols' setting. | текст | необавезно |
| rules | rules | Produces vertical rules between the columns if set to yes. | текст | необавезно |
| gap | gap | Specifies the space between the content of adjacent columns. | текст | необавезно |
| style | style | Specifies any custom styling. | текст | необавезно |
Redirects
- {{Div col start}}
See also
Column-generating template families
Lua error: Cannot create process: proc_open(/dev/null): failed to open stream: Operation not permitted
| Family | Type | Handles wiki
table code? |
Start template | Column divider | End template |
|---|---|---|---|---|---|
| "Col" | Table | Да | {{Col-begin}} or {{Col-begin-small}} |
{{Col-break}} {{Col-2}} .. {{Col-5}} |
{{Col-end}} |
| "Columns" | Table | Не | {{Columns}} | – | – |
| "Multicol" | Table | Да | {{Multicol}} | {{Multicol-break}} | {{Multicol-end}} |
| "Col-float" | CSS float | Да | {{Col-float}} | {{Col-float-break}} | {{Col-float-end}} |
| "Columns-start" | CSS float | Да | {{Columns-start}} | {{Column}} | {{Columns-end}} |
| "Div col" | CSS columns | Да | {{Div col}} – {{Columns-list}} (wrapper) |
{{No col break}} | {{Div col end}} |
I.e., can the columns handle the wiki markup {| | || |- |} used to create tables? If not, templates that produce these elements (such as {{(!}}, {{!}}, {{!!}}, {{!-}}, {{!)}}) and/or HTML tags (
<table>...</table>, <tr>...</tr>, etc.) will need to be used instead.