I have created a grid with a 5x7 layout using divs. I am trying to achieve a feature similar to the Netflix interface where, upon clicking on a div, a larger div will appear beneath it. This larger div should expand to 100% width of the parent container, pushing down the subsequent rows on the page. The user should be able to close this expanded div or click on another div to return to the initial configuration.
Here is the current layout:
https://i.stack.imgur.com/TuBYN.pngHere is the desired outcome:
https://i.stack.imgur.com/AOfg5.pngHTML (utilizing Laravel framework):
<section class="content">
<div class="grid">
@for ($i = 1; $i <= 35; $i++)
<div class="gridcell" id="{{ $i }}">
<h5>Space # {{ $i }}</h5>
@foreach ($auctions as $auction)
@if ($auction->position == $i)
<img src="{{ $auction->imgUrl }}" alt="{{ $auction->description }}">
@endif
@endforeach
</div>
@endfor
</div>
</section>
CSS:
.grid {
width: 100%;
text-align: center;
}
.gridcell {
display: inline-block;
float: left;
min-height: 150px;
width: 180px;
padding: 15px;
margin: 10px 10px;
border: 1px solid #000;
min-height: 180px;
}
Thank you!