This seems like a simple task, but despite my efforts, I have yet to come across a solution.
The issue is straightforward - I have a single image that I want to display in the center of the page. That's it.
Below is the CSS code that successfully achieves this:
.centered {
position: fixed;
top: 50%;
left: 50%;
/* add necessary prefixes */
transform: translate(-50%, -50%);
}
In my HTML code, all I need is this:
<div class="centered">
<img src="https://via.placeholder.com/100">
</div>
Despite my search effort, I have been unable to find a method using Bootstrap 4 to achieve this. Can anyone provide assistance?