Using Bootstrap 4 Alpha 6. I have the following markup:
<header class="jumbotron jumbotron-fluid">
<div class="container">
<div class="row justify-content-center flex-column-reverse flex-sm-row">
<div class="col-12 col-sm-6">
<h1 class="display-4">
<a class="border-0" href="/@v">Vic</a>
</h1>
<p class="lead mb-100">We utilize a default z-index scale in Bootstrap that’s been designed to properly layer navigation, tooltips and popovers, modals, and more.</p>
<p>
<svg>...</svg>Boston, MA, US<br>
</p>
</div>
<div class="col-12 col-sm-2">
<a class="border-0" href="/@v">
<img class="d-flex rounded-circle avatar--m" alt="Random Name" src="/system/profiles/avatars/000/000/001/avatar_m/firefox-copy-link.jpg?1489589655">
</a> </div>
</div>
</div>
</header>
which produces the following result on mobile and desktop respectively:
Mobile

Desktop

The desktop version currently looks perfect. How do I center the image on mobile only?
You can use the Bootstrap 4 responsive margin utils on the image. Use mx-auto to center, and then mx-sm-0 to keep normal margins on sm an up.
<img class="d-flex rounded-circle mx-auto mx-sm-0" src="//placehold.it/80">
Demo: http://www.codeply.com/go/qDSHKeueac
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With