I have a grid of items that expand to show a table below when clicked. While this functionality works, it causes the DIVs to reorder as shown in my example below.
I want them to maintain their positions within their respective "columns".
Here is an illustration for clarity:
Below is the HTML code I'm working with:
<div
class="item-component"
ng-controller="CollapseCtrl"
ng-repeat="component in components.components | filter : components.filterByFilter | filter : searchText"
>
<div class="component-wrapper" ng-click="isCollapsed = !isCollapsed">
Item - click to expand
</div>
<div class="codes-wrapper" collapse="isCollapsed">
<table class="table table-striped table-condensed">
Expanded content here
</table>
</div>
</div>
Additionally, here is the .item-component class:
.item-component {
width: 33.33333333333333%;
float: left;
padding-left: 15px;
}
How can I achieve the "expected result" from my illustration?