Here is a simple way to achieve alignment using only native Bootstrap 4 classes, without the need for any custom CSS:
One important rule to remember: avoid nesting Bootstrap containers within each other!
To align your content, simply add the classes d-flex justify-content-center
to the column and align-self-center
to the anchor tag containing the spinner. Additionally, you can use the pb-4
class to push the spinner up slightly, ensuring better centering especially with background images like in your case.
Below is the code snippet:
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/css/bootstrap.min.css" integrity="sha384-Zug+QiDoJOrZ5t4lssLdxGhVrurbmBWopoEl+M6BdEfwnCJZtKxi1KgxUyJq13dy" crossorigin="anonymous">
<style>
.ipad_right{
background: url("https://t00.deviantart.net/LVytvO1_H3UYV-jGPqj79iw4fPU=/300x200/filters:fixed_height(100,100):origin()/pre00/acd7/th/pre/f/2016/072/c/2/taking_photo_for_tablet_png_by_nayulipa-d9v0h5i.png");
background-repeat: repeat;
background-position-x: 0%;
background-position-y: 0%;
opacity: .97;
background-repeat: no-repeat;
background-position: bottom center;
}
.tt_button {
-webkit-animation: rotation 1800ms infinite linear;
-moz-animation: rotation 1800ms infinite linear;
-o-animation: rotation 1800ms infinite linear;
animation: rotation 1800ms infinite linear;
transform-origin: 50% 50%;
-webkit-transform-origin: 50% 50%;
-moz-transform-origin: 50% 50%;
}
@-webkit-keyframes rotation {
from {-webkit-transform: rotate(0deg);}
to {-webkit-transform: rotate(359deg);}
}
@-moz-keyframes rotation {
from {-moz-transform: rotate(0deg);}
to {-moz-transform: rotate(360deg);}
}
@-o-keyframes rotation {
from {-o-transform: rotate(0deg);}
to {-o-transform: rotate(360deg);}
}
@keyframes rotation {
from {transform: rotate(0deg);}
to {transform: rotate(360deg);}
}
</style>
<div class="container">
<div class="row">
<div class="col-lg-10 mx-auto">
<h1 class="text-uppercase">
<strong>SVG SPINNER</strong>
<hr class="light my-4">
<p class="text-faded mb-5">VERTICALLY ALIGNED</p>
</h1>
</div>
</div>
<div class="row" style="height:200px;">
<div class="col-lg-8 mx-auto my-auto">SUBSCRIBE</div>
<div class="col-lg-4 ipad_right d-flex justify-content-center">
<a class="js-scroll-trigger align-self-center pb-4" href="#about">
<img src="https://picsum.photos/44/">
</a>
</div>
</div>
</div>
Keep in mind that adjustments may be needed for smaller screens.
Lastly, avoid inserting extensive SVG code directly into your examples in the future!