Hi there, fellow community members! I've been struggling with formatting my images on a webpage.
HTML
<footer>
<section class="socialmedia">
<a href=""><img src="facebook.png" class="sm"></a>
<a href=""><img src="twitter.png" class="sm"></a>
<a href=""><img src="instagram.png" class="sm"></a>
</section>
</footer>
CSS
.sm {
display: block;
}
/* Applying a hover effect */
.sm:hover {
opacity: 0.7;
}
.socialmedia {
display: block;
left: 45%;
float: left;
width: 2%;
}
The images are currently stacked vertically to the left of the page in their original sizes. I believe the
float: left;
property is meant to align them horizontally?
I also wish to center these images on the page, but using margin: auto; hasn't worked for me so far.
EDIT: Additionally, I'd like some space between each image. Is there an alternative to
& nbsp;