I'm currently facing an issue in my React project where adding padding to some images at the bottom of the page in a separate CSS class is causing the main image at the top of the page to move.
Main Image
<div className="self--image">
<img src={Me} alt="Me"/>
</div>
Additional Images
<div className="bottom--cont">
<a href="https://github.com/mm2023git">
<img src={github} alt="Github"/>
</a>
<a href="https://www.instagram.com/mokelmoo/">
<img src={insta} alt = "Instagram"/>
</a>
</div>
CSS
.self--image > img{
width: 317px;
}
.bottom--cont{
background-color: #161619;
position: relative;
top: -47px;
}
.bottom--cont > a, img{
width: 25px;
display: inline-block;
position: relative;
padding-left: 20px;
}
Is there a way to prevent the padding and positioning on the additional images from affecting the main image?