แม่แบบ:Div col
หน้าตา
Columns are not supported by some older browsers, most notably Internet Explorer 9 and below and Opera 11.0 and below. See this page for more information. |
แม่แบบ:CSS3 multiple column layout
This template, together with {{div col end}}, is used to make a list into columns, with the option of specifying a smaller font. It has the advantage over other column templates (i.e. {{col-begin}}) that it automatically breaks each column to an equal space, so you do not manually have to find the "half way" point on two columns, for instance.
This template 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
[แก้ไข]- cols = (or {{{1}}})
- Specifies the number of columns. Defaults to 2 columns.
- colwidth = (or {{{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 =
- produces vertical rules between the columns if set to yes.
- small =
- Specifies small font size (90%) if set to yes.
- style =
- Specify any custom styling.
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
[แก้ไข]See main template page.
See also
[แก้ไข]- {{multicol}}
- {{col-begin}}
- {{columns-list}}
The above คู่มือการใช้งานเป็นการรวมข้ามจากแม่แบบ:Div col/doc. (แก้ | ประวัติ) ผู้แก้ไขสามารถทำการทดลองได้ที่มอดูล (สร้าง | คัดลอก) และชุดทดสอบ (สร้าง) ของแม่แบบนี้ โปรดเพิ่มหมวดหมู่ไปที่หน้าย่อย /doc หน้าย่อยของแม่แบบนี้. |