Hotfix release available: 2025-05-14b "Librarian".
upgrade now! [56.2] (what's this?)
Hotfix release available: 2025-05-14a "Librarian".
upgrade now! [56.1] (what's this?)
New release available: 2025-05-14 "Librarian".
upgrade now! [56] (what's this?)
Hotfix release available: 2024-02-06b "Kaos".
upgrade now! [55.2] (what's this?)
Hotfix release available: 2024-02-06a "Kaos".
upgrade now! [55.1] (what's this?)
New release available: 2024-02-06 "Kaos".
upgrade now! [55] (what's this?)
Hotfix release available: 2023-04-04b "Jack Jackrum".
upgrade now! [54.2] (what's this?)
code-schnipsel:html:mehrspaltig
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| code-schnipsel:html:mehrspaltig [2011/10/07 11:08] – tietz | code-schnipsel:html:mehrspaltig [2024/01/05 13:07] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ===Mehrspaltige Inhaltselemente=== | ||
| + | \\ | ||
| + | Informationen zu HTHL und CSS sind unter [[http:// | ||
| + | ==HTML== | ||
| + | Für 2 Spalten (z.B. 50% / 50%): | ||
| + | < | ||
| + | <!-- Subtemplate: | ||
| + | <div class=" | ||
| + | <div class=" | ||
| + | <div class=" | ||
| + | <!-- Inhalt linker Block --> | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | <div class=" | ||
| + | <div class=" | ||
| + | <!-- Inhalt rechter Block --> | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | und für drei Spalten (z,B. 33% / 33% / 33%): | ||
| + | < | ||
| + | <!-- Subtemplate: | ||
| + | <div class=" | ||
| + | <div class=" | ||
| + | <div class=" | ||
| + | <!-- Inhalt linker Block --> | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | <div class=" | ||
| + | <div class=" | ||
| + | <!-- Inhalt mittlerer (linker) Block --> | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | <div class=" | ||
| + | <div class=" | ||
| + | <!-- Inhalt rechter Block --> | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | Die möglichen Spaltenteilungen dem CSS entnehmen (Summe immer 100 ... logisch) | ||
| + | <note important> | ||
| + | \\ | ||
| + | ==CSS: | ||
| + | < | ||
| + | @media all | ||
| + | { | ||
| + | /** | ||
| + | * @section subtemplates | ||
| + | * @see | ||
| + | */ | ||
| + | .subcolumns { display: | ||
| + | .subcolumns_oldgecko { width: 100%; float:left; } | ||
| + | |||
| + | .c20l, .c25l, .c33l, .c40l, .c38l, .c50l, .c60l, .c62l, .c66l, .c75l, .c80l { float:left; } | ||
| + | .c20r, .c25r, .c33r, .c40r, .c38r, .c50r, .c60r, .c66r, .c62r, .c75r, .c80r { float: | ||
| + | |||
| + | .c20l, .c20r { width:20%; } | ||
| + | .c40l, .c40r { width:40%; } | ||
| + | .c60l, .c60r { width:60%; } | ||
| + | .c80l, .c80r { width:80%; } | ||
| + | .c25l, .c25r { width:25%; } | ||
| + | .c33l, .c33r { width: | ||
| + | .c50l, .c50r { width:50%; } | ||
| + | .c66l, .c66r { width: | ||
| + | .c75l, .c75r { width:75%; } | ||
| + | .c38l, .c38r { width: | ||
| + | .c62l, .c62r { width: | ||
| + | |||
| + | .subc { padding:0 0.5em; } | ||
| + | .subcl { padding:0 1em 0 0; } | ||
| + | .subcr { padding:0 0 0 1em; } | ||
| + | |||
| + | .equalize, .equalize .subcolumns { table-layout: | ||
| + | |||
| + | .equalize > div { | ||
| + | display: | ||
| + | float: | ||
| + | margin: | ||
| + | overflow: | ||
| + | vertical-align: | ||
| + | } | ||
| + | } | ||
| + | |||
| + | @media print | ||
| + | { | ||
| + | /** | ||
| + | * (en) float clearing for subtemplates. Uses display: | ||
| + | * (de) Float Clearing für Subtemplates. Verwendet display: | ||
| + | */ | ||
| + | |||
| + | .subcolumns, | ||
| + | .subcolumns > div { | ||
| + | overflow: | ||
| + | display: | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | Und wie üblich die IE CSS-Anpassungen: | ||
| + | (einzubinden mit <!--[if lte IE 7]>< | ||
| + | < | ||
| + | @media screen, projection | ||
| + | { | ||
| + | /** | ||
| + | * (en) IE-Adjustments for subtemplates | ||
| + | * (de) IE-Anpassung für Subtemplates | ||
| + | * | ||
| + | * Doubled Float-Margin Bug | ||
| + | * @see http:// | ||
| + | * | ||
| + | * @bugfix | ||
| + | * @affected | ||
| + | * @css-for | ||
| + | * @valid | ||
| + | */ | ||
| + | |||
| + | .c20l, .c25l, .c33l, .c38l, .c40l, .c50l, .c60l, .c62l, .c66l, .c75l, .c80l, | ||
| + | .c20r, .c25r, .c33r, .c38r, .c40r, .c50r, .c60r, .c66r, .c62r, .c75r, .c80r { display: | ||
| + | |||
| + | /* Fix for:" | ||
| + | * html .equalize, * html .equalize .subcolumns { overflow: | ||
| + | .equalize, .equalize .subcolumns { overflow: | ||
| + | |||
| + | /* transform CSS tables back into floats */ | ||
| + | .equalize .c20l, | ||
| + | .equalize .c25l, | ||
| + | .equalize .c62l, | ||
| + | float:left; display: | ||
| + | padding-bottom: | ||
| + | margin-bottom: | ||
| + | } | ||
| + | .equalize .c20r, | ||
| + | .equalize .c25r, | ||
| + | .equalize .c62r, | ||
| + | float: | ||
| + | padding-bottom: | ||
| + | margin-bottom: | ||
| + | } | ||
| + | |||
| + | .no-ie-padding .c20l, | ||
| + | .no-ie-padding .c20r, | ||
| + | .no-ie-padding .c25l, | ||
| + | .no-ie-padding .c62l, | ||
| + | .no-ie-padding .c25r, | ||
| + | .no-ie-padding .c62r, | ||
| + | padding-bottom: | ||
| + | margin-bottom: | ||
| + | } | ||
| + | | ||
| + | /** | ||
| + | * Internet Explorer and the Expanding Box Problem | ||
| + | * @see http:// | ||
| + | * | ||
| + | * @workaround | ||
| + | * @affected | ||
| + | * @css-for | ||
| + | * @valid | ||
| + | */ | ||
| + | | ||
| + | /* avoid growing widths */ | ||
| + | * html .subc, | ||
| + | * html .subcl, | ||
| + | * html .subcr { word-wrap: | ||
| + | } | ||
| + | </ | ||