Bản mẫu:Columns-list

Bách khoa toàn thư mở Wikipedia
Buớc tưới chuyển hướng Bước tới tìm kiếm
Hình tượng tài liệu Tài liệu bản mẫu[xem] [sửa] [lịch sử] [làm tươi]

This template is for use in a list in the body of an article, rather than in a navigation template like Template:Navbox. Based on Template:Reflist, but different in that the text to be displayed is manually created rather than a list of references.

Use[sửa mã nguồn]

The width of each column may be specified using |colwidth= and a value in ems.

Text (usually a list)

Here, width specifies the width of the columns, and determines dynamically the number of columns based on screen width; more columns will be shown on wider displays.

If |colwidth= is not specified, the default width of 30em will be used.

This template uses CSS3 multiple-column layout, which is not supported by all Web browsers.

CSS3 multiple-column layout
browser support
Firefox Safari Chrome Opera
≤ 9 ≤ 1.0 ≤ 2 Không có ≤ 11.0
≥ 10
≥ 1.5
≥ 3
≥ 1
≥ 11.1

Examples[sửa mã nguồn]

Here is an example:

* [[George Washington]]
* [[John Adams]]
* [[Thomas Jefferson]]
* [[James Madison]]
* [[James Monroe]]

which would render as:

CSS styles can also be added in addition to the colwidth parameter. For example:

{{columns-list|colwidth=15em|style=width: 600px; font-style: italic;|
* [[All About Lily Chou-Chou]]
* [[April Story]]
* [[Hana and Alice|Hana & Alice]]
* [[Hōtai Club]]
* [[The Kon Ichikawa Story]]
* [[Love Letter (1995 film)|Love Letter]]
* [[New York, I Love You]]
* [[Picnic (1996 film)|Picnic]]
* [[Rainbow Song]]
* [[Swallowtail (film)|Swallowtail]]

which would render as:

Error messages[sửa mã nguồn]

Use of the no-longer-supported parameter |cols=, or use of the first unnamed parameter (aka |1=) along with |2= or a second unnamed parameter for the template's content, will generate a red error message. To fix this error, use |colwidth= instead of attempting to specify the number of columns.

The presence of an equals sign within the template's content can also cause display problems and red error messages. To fix this problem, add |1= in front of the template's content.

Redirects[sửa mã nguồn]

Tracking category[sửa mã nguồn]

See also[sửa mã nguồn]

Column-generating template families[sửa mã nguồn]

Gia đình Kiểu
Handles wiki
 table code?dagger
Bản mẫu bắt đầu Phân chia cột Bản mẫu kết thúc
"Col" Table {{Col-begin}}
hoặc {{Col-begin-small}}
{{Col-2}} .. {{Col-5}}
"Columns" Table Không {{Columns}}
"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)
{{Div col end}}

dagger 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.