title: How to stop an image from moving when using different scroll/resolution?
body: <p>I am currently making a portfolio in HTML/CSS. But I have encountered the problem, that whenever I change either the scroll level or the resolution size, the images on the site moves around. I want them to stay in the block they are currently sitting in, at zoom 100% on a 1920x1080 monitor.</p>
  <p>I have tried to change the position in the CSS to absolute, but that removed some images and totally changed the places the one left image was.</p>
  <p>Here is the code:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.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;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="row"&gt;
    &lt;div class="containerPortfolio"&gt;
      &lt;img ondragstart="return false" width="400" height="400" src="images/backgrounds/portfolio1.jpg"&gt;
      &lt;div class="content"&gt;
        &lt;p&gt;Lorem ipsum..&lt;/p&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="containerPortfolio"&gt;
      &lt;img ondragstart="return false" width="400" height="400" src="images/backgrounds/portfolio2.jpg"&gt;
      &lt;div class="content"&gt;
        &lt;p&gt;Lorem ipsum..&lt;/p&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="containerPortfolio"&gt;
      &lt;img ondragstart="return false" width="400" height="400" src="images/backgrounds/portfolio3.jpg"&gt;
      &lt;div class="content"&gt;
        &lt;p&gt;Lorem ipsum..&lt;/p&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="containerPortfolio"&gt;
      &lt;img ondragstart="return false" width="400" height="400" src="images/backgrounds/portfolio4.jpg"&gt;
      &lt;div class="content"&gt;
        &lt;p&gt;Lorem ipsum..&lt;/p&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="containerPortfolio"&gt;
      &lt;img ondragstart="return false" width="400" height="400" src="images/backgrounds/portfolio5.jpg"&gt;
      &lt;div class="content"&gt;
        &lt;p&gt;Lorem ipsum..&lt;/p&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="containerPortfolio"&gt;
      &lt;img ondragstart="return false" width="400" height="400" src="images/backgrounds/portfolio6.jpg"&gt;
      &lt;div class="content"&gt;
        &lt;p&gt;Lorem ipsum..&lt;/p&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="containerPortfolio"&gt;
      &lt;img ondragstart="return false" width="400" height="400" src="images/backgrounds/portfolio7.jpg"&gt;
      &lt;div class="content"&gt;
        &lt;p&gt;Lorem ipsum..&lt;/p&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="containerPortfolio"&gt;
      &lt;img ondragstart="return false" width="400" height="400" src="images/backgrounds/portfolio8.jpg"&gt;
      &lt;div class="content"&gt;
        &lt;p&gt;Lorem ipsum..&lt;/p&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>