• Hjem
  • Tilfældig
  • I nærheden
  • Log på
  • Indstillinger
Donate Now If Wikipedia is useful to you, please give today.
  • Om Wikipedia
  • Forbehold
Wikipedia

Skabelon:Div col

  • Sprog
  • Overvåg
  • Vis kilde
Skabelondokumentation[vis] [redigér] [historik] [opfrisk]
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
browser support
Internet
Explorer
Firefox Safari Chrome Opera
≤ 9 ≤ 1.0 ≤ 2 N/A ≤ 11.0
≥ 10
(2012)
≥ 1.5
(2005)
≥ 3
(2007)
≥ 1
(2008)
≥ 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)

Indholdsfortegnelse

  • 1 Brug
  • 2 Eksempler
  • 3 TemplateData
  • 4 Omdirigeringer
  • 5 Se også
    • 5.1 Column-generating template families

Brug

|cols= or first unnamed parameter
(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.
|rules=
Adds vertical lines ("rules") between the columns if set to yes or some CSS styling (e.g. 1px dashed blue;).
|gap=
Specifies the space between the content of adjacent columns. The default spacing is 1em.
|style=
CSS styling to apply to the columns.

Eksempler

{{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

Dette er denne skabelons TemplateData-dokumentation, som bruges af VisualEditor og andre værktøjer.

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

Skabelonparametre[Rediger TemplateData]

ParameterBeskrivelseTypeStatus
colscols 1

Specifies the number of columns.

Standardværdi
2
Strengvalgfri
colwidthcolwidth 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.

Strengvalgfri
rulesrules

Produces vertical rules between the columns if set to yes.

Strengvalgfri
gapgap

Specifies the space between the content of adjacent columns.

Strengvalgfri
stylestyle

Specifies any custom styling.

Strengvalgfri

Omdirigeringer

  • {{Div col start}}

Se også

Column-generating template families

CautionThe templates listed here are not interchangeable. For example, using {{Multicol}} with {{col-end}} instead of {{Multicol-end}} would leave a HTML "div" (division) open, potentially harming any subsequent formatting.
Family Type
Handles wiki
 table code?dagger
Start template Break between columns End template
"Col" Table {{Col-begin}}
or {{Col-begin-small}}
{{Col-break}}
{{Col-2}} .. {{Col-5}}
{{Col-end}}
"Col-float" CSS float Green tickY {{Col-float}} {{Col-float-break}} {{Col-float-end}}
"Columns" Table Green tickY {{Columns}} – –
"Columns-start" CSS float Green tickY {{Columns-start}} {{Column}} {{Columns-end}}
"Div col" CSS columns Green tickY {{Div col}}
– {{Columns-list}} (wrapper)
– {{Div col end}}
"Multicol" Table {{Multicol}} {{Multicol-break}} {{Multicol-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.

Dokumentationen ovenfor er transkluderet fra Skabelon:Div col/dok. (redigér | historik)
Brugere kan eksperimentere i denne skabelons undersider sandkasse (opret | kopiér) og testcases (opret).
Tilføj venligst kategorier til /dok-undersiden. Undersider til denne skabelon.
Hentet fra "https://da.wikipedia.org/w/index.php?title=Skabelon:Div_col&oldid=10080030"
Sidst redigeret den 2. oktober 2019, klokken 22:25

Sprog

    • Nordfriisk
    Wikipedia
    • Wikimedia Foundation
    • Powered by MediaWiki
    • Denne side blev senest ændret den 2. oktober 2019 kl. 22:25.
    • Indholdet er udgivet under CC BY-SA 4.0 medmindre andet er angivet.
    • Privatlivspolitik
    • Om Wikipedia
    • Forbehold
    • Adfærdskodeks
    • Udviklere
    • Statistik
    • Cookie-erklæring
    • Vilkår for anvendelse
    • Slå mobilvisning fra