I have 4 divs which create 4 rows in a page. In each of these rows, are 4 square divs, so essentially we have a 4 x 4 block of (16) square divs.
When a user hovers over a div, the height is dynamically changed to be +40px. Right now, this adjusts the height of the parent container, and thusly pushes the rows below down.
What I want is to be able to push down ONLY the elements directly below the resized element.
Setup
<div class="row">
<div class="element"></div>
<div class="element"></div>
<div class="element"></div>
<div class="element"></div>
</div>
<div class="row">
<div class="element"></div>
<div class="element blue"></div>
<div class="element"></div>
<div class="element"></div>
</div>
<div class="row">
<div class="element"></div>
<div class="element"></div>
<div class="element"></div>
<div class="element"></div>
</div>
<div class="row">
<div class="element"></div>
<div class="element"></div>
<div class="element"></div>
<div class="element"></div>
</div>
Desired Affect
And, then when the blue element is resized, the following behavior would happen (hacked with css to demonstrate desired behavior):
Is this possible? I thought it might be when using masonry, but I have used masonry very little and would not know where to even begin.
Any advice/pointers would be greatly appreciated.