title: Html/CSS - Image size and text content equal sizes
body: <p>I'm trying to resize the image size to the same size as the content of the text. However, when I try using solutions such as flex, the images are grayed out. Does anyone know any other way of achieving this? Or if I am doing something wrong. The Code is below, both html and Css, the website this is on is: <a href="https://jackdaly.github.io" rel="nofollow noreferrer">on this page here</a> . Any help would be much appreciated.</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>/* Create two equal columns that floats next to each other */
  .column {
      float: left;
      width: 50%;
      padding: 0px;
      overflow: auto;  
      height: 300px; /* Should be removed. Only for demonstration */
  }
  
  
  
  
  /* Clear floats after the columns */
  .row:after {
      content: "";
      display: table;
      clear: both;
      background-color: black;
  }
  .row{
      padding: 0.5% 1%;
      
  }
  
  
  .textcont{
      background-color: black;
      padding: 1.5%;
      width: 100%;
      overflow: auto;  
      height: 300px;
      position: relative;
      /*overflow: hidden;*/
      
  
   
  
  }
  .textcont  &gt; h1 {
      margin: 0;
      color: white;
      text-shadow: 0 1px 0 white;
  }
  
  
  
  .imgcont{
      background: 
          linear-gradient(
              to right,
              rgba(0, 0, 0, 0),
              rgba(0, 0, 0, 5)
          ),
          url('https://jackdaly.github.io/images/drawing (6).jpg');
      background-repeat: no-repeat;
      background-size: cover;
      background-position: center;
      width: 100%;
      height: 100%;
      position: relative;
      overflow: hidden;
  }
  
  
  .buttonproj {
      background-color: transparent;
      color: white;
      align-content: center;
      padding: 1%;
      border: 3px solid white;
  
  }
  
  .buttonproj:hover {
      background-color: #555555;
  
      color: white;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>                        &lt;h2 class="w3-center" style="padding-bottom: 2%"&gt;Portfolio&lt;/h2&gt;
                          &lt;div class="row"&gt;
                              &lt;!-- ##### --&gt;
                              &lt;div class="column" style="background-color:#aaa;"&gt;
                                  &lt;div class="imgcont" style="background-image:linear-gradient(
                                                              to right,
                                                              rgba(0, 0, 0, 0),
                                                              rgba(0, 0, 0, 5)
                                                              ), url('./images/fishtankcover.png')"&gt;&lt;/div&gt;
                              &lt;/div&gt;
                              &lt;div class="column" style=""&gt;
                                  &lt;div class="textcont" style="" align="right"&gt;
                                      &lt;h1&gt;Smart Tank &lt;/h1&gt;
                                      &lt;p style="color: aliceblue"&gt;It can be a daunting experience for people buying, setting up and maintaining (or even thinking about) a fish tank and if they have the time needed for this hobby to keep their new friends alive. The AAS, short for Automatic Aquarium System (known as Smart Tank now), is a work in progress project that aims to be the step ladder for new users to climb with ease over the learning wall. The Smart Tank takes care of everything needed to take care of a fully planted aquarium.&lt;/p&gt;
                                      &lt;div align="right" padding="1% 10%"&gt;
                                          &lt;button class="buttonproj"  &gt;&lt;a href="Coming_Soon.html" style="text-decoration:none; "&gt;Find Out More&lt;/a&gt;&lt;/button&gt;
                                      &lt;/div&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                              &lt;!-- ##### --&gt;
                              &lt;div class="column" style=""&gt;
                                  &lt;div class="textcont" style="" align="left"&gt;
                                      &lt;h1&gt;CNC Dust Shoe &lt;/h1&gt;
                                      &lt;p style="color: aliceblue"&gt;CNC Dust shoes are incredibly important when milling any material, especially materials that can be toxic or bad for the user's health. With this project, I aimed to combine functionality with aesthetics to create a highly functional product that looks aesthetically pleasing. The project was designed in Fusion 360 and showcases how highly functional tools can also take on pleasing form. The shoe can be moved up and down, adjusted with ease and the hoover extension can be removed for different additions.&lt;/p&gt;
                                      &lt;div align="left" padding="1% 10%"&gt;
                                          &lt;button class="buttonproj"  &gt;&lt;a href="Coming_Soon.html" style="text-decoration:none; "&gt;Find Out More&lt;/a&gt;&lt;/button&gt;
                                      &lt;/div&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                              &lt;div class="column" style="background-color:#aaa;"&gt;
                                  &lt;div class="imgcont" style="background-image:linear-gradient(
                                                              to left,
                                                              rgba(0, 0, 0, 0),
                                                              rgba(0, 0, 0, 1)
  
                                                              ), url('https://jackdaly.github.io/images/cncshoe (3).png') "&gt;&lt;/div&gt;
                              &lt;/div&gt;
  
                              &lt;!-- ##### --&gt;
                          &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>