I am laying divs out on a page, horizontally. Effectively they look like rows in a table. When the user clicks on a div it may change its height, e.g. from 120px to 240px. This is where the problem occurs.
When the div expands I want it to push the others in the 'column' down. That's not what's happening though.
In this JS Fiddle:
.tile { width: 300px; border: 1px solid black; height: 120px; margin: 8px; display: inline-block; }
<div id='outer'>
<div class='tile'>Notice 1</div>
<div class='tile'>Notice 2</div>
<div class='tile'>Notice 3</div>
<div class='tile'>Notice 4</div>
<div class='tile'>Notice 5</div>
<div class='tile'>Notice 6</div>
<div style='background: red;' onclick='this.style.height="250px"' class='tile'>Notice 7</div>
<div class='tile'>Notice 8</div>
<div class='tile'>Notice 9</div>
<div class='tile'>Notice 10</div>
<div class='tile'>Notice 11</div>
<div class='tile'>Notice 12</div>
</div>
...it increases the height of the entire 'row'. (Click the red tile to see the effect. Resize the results view to experiment with different browser widths).
When I try the same code natively (in Firefox), I get a different (though still unwanted) effect. When the 'cell' is expanded, the rows below are shortened so that the right edge of the expended 'cell' is the left most edge of the subsequent rows.
I can think of ways to do this with javascript but I'd really like to avoid it if I could.