Posts Tagged with divs

Displaying 1-3 of 3 results.
Wiki: Equalize Heights of Divswiki
posted by admin on August 3, 2016

var maxHeight = 0;

$("div").each(function(){
if ($(this).height() > maxHeight) { maxHeight = $(this).height(); }
});

$("div").height(maxHeight);
Read more
Resolved: How to align 3 divs (left/center/right) inside another div?
posted by admin on July 18, 2016

[[LEFT] [CENTER] [RIGHT]]

Container div is 100% wide (no set width), and center div should remain in center after resizing the container.

So I set:

#container{width:100%;}
#left{float:left;width:100px;}
#right{float:right;width:100px;}
#center{margin:0 auto;width:100px;}
Read more
Resolved: Sort divs bases on element's data attribute
posted by admin on December 22, 2015
If I have several divs:

<div data-sort='4'>div4</div>
<div data-sort='8'>div8</div>
<div data-sort='1'>div1</div>
<div data-sort='19'>div19</div>
<div data-sort='12'>div12</div>

Actually I want to sort divs by data attribute by sorting ASC and DESCRead more