In an attempt to display text below a loading image, I encountered alignment issues in different browsers. Screenshots of the layout on Chrome and IE are provided for reference.
Below is the HTML code snippet utilized:
.LoaderwithText {
position: fixed;
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
top: 50%;
left: 50%;
white-space: nowrap;
}
.loader {
border: 12px solid #f3f3f3;
border-top: 12px solid #3498db;
border-radius: 50%;
width: 80px;
height: 80px;
-ms-animation: spin 2s linear infinite;
-webkit-animation: spin 2s linear infinite;
-o-animation: spin 2s linear infinite;
opacity: 0.5;
position: absolute;
}
#LoaderText {
Color: black;
font-size: 14px;
}
@keyframes spin {
0% {transform: rotate(0deg);}
100% {transform: rotate(360deg);}
}
@-webkit-keyframes spin {
0% {-webkit-transform: rotate(0deg);}
100% {-webkit-transform: rotate(-360deg);}
}
<div class="LoaderwithText">
<a class="loader"></a>
<p id="LoaderText">Deleting...</p>
</div>
A question arises regarding the missing styles that would ensure consistent behavior across all browsers.