Reputation: 67
I'm still wrapping my head around bootstrap's grid system, and I'd like to set up a photo grid consisting of three images, with this layout. How would I go about it?
Upvotes: 0
Views: 2056
Reputation: 30
Here is an example of the grid system. You need to create a row to hold all of the sections. Then inside the row, create 2 columns, left and right. On the right column, create 2 rows.
So the structure should be like this:
- row
- column
- column
- row
- row
<html>
<head>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
</head>
<body>
<div class="container">
<div class="row">
<div class="col" style="padding:100px; background:red;">
1
</div>
<div class="col">
<div class="row" style="padding:100px; background:blue;">
2
</div>
<div class="row" style="padding:100px; background:gray;">
3
</div>
</div>
</div>
</div>
</body>
</html>
Upvotes: 1