1.593 Bytes hinzugefügt
, 14:01, 30. Nov. 2020
<includeonly><div class="twocol" style="width:{{#if:{{{width1|}}}|{{{width1}}}|{{#if:{{{width2|}}}|calc( 98% - {{{width2}}}) |49%}}}};">{{{1}}}</div>
<div class="twocol" style="width:{{#if:{{{width2|}}}|{{{width2}}}|{{#if:{{{width1|}}}|calc( 98% - {{{width1}}}) |49%}}}};">{{{2}}}</div>{{Clear}}</includeonly><noinclude>
== Beschreibung ==
erzeugt 2 nebeneinander gefloatete Spalten
== Anwendung ==
=== ohne Breitenangaben ===
ohne Verwendung der optionalen Parameter <code>width1</code> und <code>width2</code> erhalten beide Spalten eine Breite von 49% der zur Verfügung stehenden Breite. Der Abstand zwischen beiden (als padding-right der ersten realisiert) beträgt 2%.
<pre>{{2Spalten|Inhalt Spalte 1|Inhalt Spalte 2}}</pre>
ergibt
{{2Spalten|Inhalt Spalte 1|Inhalt Spalte 2}}
=== mit einer Breitenangabe ===
die andere Breitenangabe wird mithilfe von calc(98% - <breite>) errechnet.
<pre>{{2Spalten|width1=300px|Inhalt Spalte 1 300 Pixel breit|Inhalt Spalte 2}}</pre>
ergibt
{{2Spalten|width1=300px|Inhalt Spalte 1 300 Pixel breit|Inhalt Spalte 2}}
<pre>{{2Spalten|width2=300px|Inhalt Spalte 1|Inhalt Spalte 2 300 Pixel breit}}</pre>
ergibt
{{2Spalten|width2=300px|Inhalt Spalte 1|Inhalt Spalte 2 300 Pixel breit}}
=== mit zwei Breitenangaben ===
<pre>{{2Spalten|width1=300px|width2=300px|Inhalt Spalte 1 300 Pixel breit|Inhalt Spalte 2 300 Pixel breit}}</pre>
ergibt
{{2Spalten|width1=300px|width2=300px|Inhalt Spalte 1 300 Pixel breit|Inhalt Spalte 2 300 Pixel breit}}
{{Beachten|Es wird nicht geprüft, die Angaben sinnvoll sind.}}
[[Kategorie:!Vorlagen|Spalten]]
</noinclude>