I am currently working on developing my HTML/CSS portfolio. However, I am facing an issue where the images on the site move around whenever the scroll level or resolution size is changed. I want the images to remain in their respective blocks, displayed at 100% zoom on a 1920x1080 monitor.
I attempted changing the position to absolute in the CSS, but this resulted in some images being removed and completely altering the remaining image placements.
Below is the code snippet:
.row {
text-align: center;
}
.containerPortfolio {
position: relative;
text-align: center;
display: inline-block;
margin: 0 auto;
}
.containerPortfolio .content {
position: absolute;
width: 400px;
bottom: 0;
background: rgb(0, 0, 0);
background: rgba(0, 0, 0, 0.5);
color: #f1f1f1;
width: 400px;
padding: 15px;
}
<div class="row">
<div class="containerPortfolio">
<img ondragstart="return false" width="400" height="400" src="images/backgrounds/portfolio1.jpg">
<div class="content">
<p>Lorem ipsum..</p>
</div>
</div>
(repeat for more containerPortfolio entries)
</div>