Reputation: 1310
Setup:
Required:
I tried using self-align-end but it applies only to columns within a row and not to the row within the container.
Thanks in Advance ;)
Snippet:
.row:last-child {
position: fixed;
bottom: 0;
left: 0;/*optional*/
}
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script>
<div class="container-fluid bg-dark" style="height: 100vh;">
<div class="row bg-warning container-fluid no-gutters justify-content-start">
This is Row 1
</div>
<div class="row bg-danger container-fluid no-gutters justify-content-center">
This is Row 2
</div>
<div class="row bg-warning container-fluid no-gutters justify-content-end">
This is Row 3
</div>
<div class="row bg-success container-fluid no-gutters justify-content-center">
This is Row 4
</div>
</div>
Upvotes: 0
Views: 2117
Reputation: 304
Add "d-flex align-content-end flex-wrap"
Try this.
/*
.row:last-child {
position: fixed;
bottom: 0;
left: 0;
}*/
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script>
<div class="container-fluid bg-dark d-flex align-content-end flex-wrap" style="height: 100vh;">
<div class="row bg-warning container-fluid no-gutters justify-content-start">
This is Row 1
</div>
<div class="row bg-danger container-fluid no-gutters justify-content-center">
This is Row 2
</div>
<div class="row bg-warning container-fluid no-gutters justify-content-end">
This is Row 3
</div>
<div class="row bg-success container-fluid no-gutters justify-content-center">
This is Row 4
</div>
</div>
Upvotes: 1
Reputation: 14159
Add Class this for container
d-flex align-items-end
/*.row:last-child {
position: fixed;
bottom: 0;
left: 0;
}*/
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script>
<div class="container-fluid bg-dark d-flex align-items-end" style="height: 100vh;">
<div class="row bg-warning container-fluid no-gutters justify-content-start">
This is Row 1
</div>
<div class="row bg-danger container-fluid no-gutters justify-content-center">
This is Row 2
</div>
<div class="row bg-warning container-fluid no-gutters justify-content-end">
This is Row 3
</div>
<div class="row bg-success container-fluid no-gutters justify-content-center">
This is Row 4
</div>
</div>
Upvotes: 1