<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de">
	<id>https://wiki.stephanschlegel.de/index.php?action=history&amp;feed=atom&amp;title=Equal_Heights</id>
	<title>Equal Heights - Versionsgeschichte</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.stephanschlegel.de/index.php?action=history&amp;feed=atom&amp;title=Equal_Heights"/>
	<link rel="alternate" type="text/html" href="https://wiki.stephanschlegel.de/index.php?title=Equal_Heights&amp;action=history"/>
	<updated>2026-05-07T03:07:29Z</updated>
	<subtitle>Versionsgeschichte dieser Seite in Wikizone</subtitle>
	<generator>MediaWiki 1.35.14</generator>
	<entry>
		<id>https://wiki.stephanschlegel.de/index.php?title=Equal_Heights&amp;diff=22475&amp;oldid=prev</id>
		<title>37.49.32.84 am 11. Oktober 2017 um 15:59 Uhr</title>
		<link rel="alternate" type="text/html" href="https://wiki.stephanschlegel.de/index.php?title=Equal_Heights&amp;diff=22475&amp;oldid=prev"/>
		<updated>2017-10-11T15:59:17Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;de&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Nächstältere Version&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version vom 11. Oktober 2017, 15:59 Uhr&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l33&quot; &gt;Zeile 33:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 33:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Stick this code anywhere on the page (or in a JavaScript file) to include it. To actually run it you can use the following markup:&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Stick this code anywhere on the page (or in a JavaScript file) to include it. To actually run it you can use the following markup:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;=== HTML ===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;javascript&lt;/del&gt;&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;html5&lt;/ins&gt;&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;div class=&amp;quot;sameHeights&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;div class=&amp;quot;sameHeights&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	&amp;lt;div data-key=&amp;quot;sameHeights&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	&amp;lt;div data-key=&amp;quot;sameHeights&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l62&quot; &gt;Zeile 62:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 62:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;You may have noticed we also initialise the plugin on window resizing as well, which means this’ll slot nicely into your responsive designs…&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;You may have noticed we also initialise the plugin on window resizing as well, which means this’ll slot nicely into your responsive designs…&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=== Mehrere Sets initialisieren===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;What if I want multiple sets on a page?&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;What if I want multiple sets on a page?&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>37.49.32.84</name></author>
	</entry>
	<entry>
		<id>https://wiki.stephanschlegel.de/index.php?title=Equal_Heights&amp;diff=22474&amp;oldid=prev</id>
		<title>37.49.32.84: Die Seite wurde neu angelegt: „Match Height / Equalize Heights... ohne jQuery, arbeitet auch Responsiv über mehrere Zeilen korrekt.  Quelle: http://benhowdle.im/easy-peasy-equal-heights.htm…“</title>
		<link rel="alternate" type="text/html" href="https://wiki.stephanschlegel.de/index.php?title=Equal_Heights&amp;diff=22474&amp;oldid=prev"/>
		<updated>2017-10-11T15:57:26Z</updated>

		<summary type="html">&lt;p&gt;Die Seite wurde neu angelegt: „Match Height / Equalize Heights... ohne jQuery, arbeitet auch Responsiv über mehrere Zeilen korrekt.  Quelle: http://benhowdle.im/easy-peasy-equal-heights.htm…“&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Neue Seite&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Match Height / Equalize Heights... ohne jQuery, arbeitet auch Responsiv über mehrere Zeilen korrekt.&lt;br /&gt;
&lt;br /&gt;
Quelle: http://benhowdle.im/easy-peasy-equal-heights.html (Zugriff 2017-10)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Making elements the same height==&lt;br /&gt;
&lt;br /&gt;
Sometimes you might have a need to grab a few elements, and then make them the same height. In an ideal world, you’d use CSS, but this isn’t an ideal world, so we must use JavaScript!&lt;br /&gt;
&lt;br /&gt;
So drop this code in and you can achieve equal heights, really easily:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
	function sameHeights(selector) {&lt;br /&gt;
	    var selector = selector || &amp;#039;[data-key=&amp;quot;sameHeights&amp;quot;]&amp;#039;,&lt;br /&gt;
	        query = document.querySelectorAll(selector),&lt;br /&gt;
	        elements = query.length,&lt;br /&gt;
	        max = 0;&lt;br /&gt;
	    if (elements) {&lt;br /&gt;
	        while (elements--) {&lt;br /&gt;
	            var element = query[elements];&lt;br /&gt;
	            if (element.clientHeight &amp;gt; max) {&lt;br /&gt;
	                max = element.clientHeight;&lt;br /&gt;
	            }&lt;br /&gt;
	        }&lt;br /&gt;
	        elements = query.length;&lt;br /&gt;
	        while (elements--) {&lt;br /&gt;
	            var element = query[elements];&lt;br /&gt;
	            element.style.height = max + &amp;#039;px&amp;#039;;&lt;br /&gt;
	        }&lt;br /&gt;
	    }&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Stick this code anywhere on the page (or in a JavaScript file) to include it. To actually run it you can use the following markup:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;sameHeights&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;div data-key=&amp;quot;sameHeights&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;div data-key=&amp;quot;sameHeights&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;div data-key=&amp;quot;sameHeights&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;div data-key=&amp;quot;sameHeights&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;div data-key=&amp;quot;sameHeights&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
(the only important part is actually putting data-key=”sameHeights” on the elements you want the same height)&lt;br /&gt;
&lt;br /&gt;
Then to initialise the code, drop this in below where you included the above JavaScript:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
	if (&amp;#039;addEventListener&amp;#039; in window) {&lt;br /&gt;
	    window.addEventListener(&amp;#039;resize&amp;#039;, function(){&lt;br /&gt;
	        sameHeights();&lt;br /&gt;
	    });&lt;br /&gt;
	    window.addEventListener(&amp;#039;load&amp;#039;, function(){&lt;br /&gt;
	        sameHeights();&lt;br /&gt;
	    });&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
There we have it, the JavaScript will make all your elements equal heights!&lt;br /&gt;
&lt;br /&gt;
You may have noticed we also initialise the plugin on window resizing as well, which means this’ll slot nicely into your responsive designs…&lt;br /&gt;
&lt;br /&gt;
What if I want multiple sets on a page?&lt;br /&gt;
&lt;br /&gt;
Say you have the following HTML:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html5&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;sameHeights&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;div data-key=&amp;quot;sameHeights&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;div data-key=&amp;quot;sameHeights&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;div data-key=&amp;quot;sameHeights&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;div data-key=&amp;quot;sameHeights&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;div data-key=&amp;quot;sameHeights&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;otherSameHeights&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;div data-key=&amp;quot;otherSameHeights&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;div data-key=&amp;quot;otherSameHeights&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;div data-key=&amp;quot;otherSameHeights&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;div data-key=&amp;quot;otherSameHeights&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;div data-key=&amp;quot;otherSameHeights&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
to make the JavaScript work on both these groups independently, simply drop in this JS:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
	if (&amp;#039;addEventListener&amp;#039; in window) {&lt;br /&gt;
	    // first group&lt;br /&gt;
	    window.addEventListener(&amp;#039;resize&amp;#039;, function(){&lt;br /&gt;
	        sameHeights(&amp;#039;[data-key=&amp;quot;sameHeights&amp;quot;]&amp;#039;);&lt;br /&gt;
	    });&lt;br /&gt;
	    window.addEventListener(&amp;#039;load&amp;#039;, function(){&lt;br /&gt;
	        sameHeights(&amp;#039;[data-key=&amp;quot;sameHeights&amp;quot;]&amp;#039;);&lt;br /&gt;
	    });&lt;br /&gt;
&lt;br /&gt;
	    // second group&lt;br /&gt;
	    window.addEventListener(&amp;#039;resize&amp;#039;, function(){&lt;br /&gt;
	        sameHeights(&amp;#039;[data-key=&amp;quot;otherSameHeights&amp;quot;]&amp;#039;);&lt;br /&gt;
	    });&lt;br /&gt;
	    window.addEventListener(&amp;#039;load&amp;#039;, function(){&lt;br /&gt;
	        sameHeights(&amp;#039;[data-key=&amp;quot;otherSameHeights&amp;quot;]&amp;#039;);&lt;br /&gt;
	    });&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
and there we have it, multiple groups acted on and an equalised.&lt;br /&gt;
&lt;br /&gt;
What about the browsers, will somebody please think of the browsers?&lt;br /&gt;
&lt;br /&gt;
This works in IE9 and above. If it’s below IE9, then the plugin just doesn’t run, it won’t error or anything awful like that.&lt;/div&gt;</summary>
		<author><name>37.49.32.84</name></author>
	</entry>
</feed>