Struggling to align an image and a span side by side? Adding margin values does not seem to work as expected. Even when trying to adjust the margins on the image, the span ends up moving along with it instead of staying fixed. Looking for a solution but can't quite figure it out.
Check out the CSS code for the image and span:
.google_logo {
margin-right: 10px;
margin-top: 5px;
}
.google span {
text-align: center;
display: fixed;
margin-bottom: 40px;
color: black;
font-weight: 550;
}
Here's the corresponding HTML code snippet:
<div class="google">
<i class="fa-brands"><img class="google_logo" src="(image link is here)"/><span>Continue with Google</span></i>
</div>
- Note: The actual image link has been shortened in this content.