skip to Main Content

I would like to use CSS to display two images next to each other with a few constraints:

  • Both images must be the same height.
  • The combined width of both images must be equal to the total width of the container.
  • The aspect ratio of both images must be maintained.

Unfortunately, the image and container dimensions are not known beforehand. Here are some example combinations of images, along with the expected output:

Examples

3

Answers


  1. you can use display:flex; and height: auto; :

    Maybe this will help?

    .container {
      display: flex;
      width: 500px;
    }
    
    .container img {
      flex: 1;
      height: auto;
      object-fit: contain;
    }
    <div class="container">
      <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATcAAACiCAMAAAATIHpEAAAAw1BMVEX///8dGxwAAAD2gCa7u7u4uLgQDQ7Dw8MbGRrj4+P3fyOtra1lZGTLy8vx8fH13sZsamv//vPyeA7mgzLe3t4XFRbU1NQLBwnOzs6oqKjp6emEg4OhoaH39/f///z///iIiIj56dPwy6haWlp0dHQnJiaZmZk9PD1UUlP559L99+foo2roi0HpfB7ofyguLC3qrntJR0g0MzTonmDmdgfsuYvmj0jnl1jvw5rx0a/ofSORkJD02rvssH9PTk/plVTzdgBkhj6GAAALJklEQVR4nO2aZ1vjOBeGHRGXVILjkjgJJJBQEhg6A0uZ/f+/6j1FckmHaxiGd8/9YYltSZYenybNWpYgCIIgCIIgCIIgCIIgCIIgCIIgCIIgCIIgCIIgCIIgCIIgCIIgCIIgCIIgCILw/8jB2VfP4Fsyvb0bffUcviEv7Wr1fO+rZ/HtOPSrOzv+7Kun8c3Yt0YXoNuOf/jVM/l2HPqgW/VCQtx7uSLhJMS9l70H8tSrr57Hd2Hf/Bhd7EiI25r9WSqUhLh3cO/798bkZhLituXJx7JNK7V3LiFuO3bvSKmHqUWBTkLclpy1UbedanuXrynE7UiI28j0JylVvWAb25+hjtUHCXGbOLjySSr//gAvJcRty/4jxTiTHc5wo1r1n756Wt+AlwsWjrKD9UjFyD8S4jYzOucg94OyA1dxvznEuUdHz791wL8Ckx3uMDvstT8hxNWUav3WAZfTGV86jqpbVkvx39/P7u1uujUtZgdd1P3WEFdTzh/Qbazi0P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AIgiAIgiAIgiAIgiAIgiAIgiAIgiAIgvAX8j827uSGa3J6jgAAAABJRU5ErkJggg=="
        encode="sync" alt="">
      <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcS4bJcZn1DhxbB02nhIwg5fq1-GY_KnnEscAA&usqp=CAU"
        alt="">
    </div>

    you can use j-Query too:

    $(document).ready(function() {
      var smallestHeight = Math.min($('#image2').height(), $('#image1').height());
      $('#image2, #image1').height(smallestHeight);
    });
    .container {
      display: flex;
      width: 500px;
    }
    
    .container img {
      flex: 1;
      height: auto;
      object-fit: contain;
    }
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
    <div class="container">
      <img id="image1" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATcAAACiCAMAAAATIHpEAAAAw1BMVEX///8dGxwAAAD2gCa7u7u4uLgQDQ7Dw8MbGRrj4+P3fyOtra1lZGTLy8vx8fH13sZsamv//vPyeA7mgzLe3t4XFRbU1NQLBwnOzs6oqKjp6emEg4OhoaH39/f///z///iIiIj56dPwy6haWlp0dHQnJiaZmZk9PD1UUlP559L99+foo2roi0HpfB7ofyguLC3qrntJR0g0MzTonmDmdgfsuYvmj0jnl1jvw5rx0a/ofSORkJD02rvssH9PTk/plVTzdgBkhj6GAAALJklEQVR4nO2aZ1vjOBeGHRGXVILjkjgJJJBQEhg6A0uZ/f+/6j1FckmHaxiGd8/9YYltSZYenybNWpYgCIIgCIIgCIIgCIIgCIIgCIIgCIIgCIIgCIIgCIIgCIIgCIIgCIIgCIIgCILw/8jB2VfP4Fsyvb0bffUcviEv7Wr1fO+rZ/HtOPSrOzv+7Kun8c3Yt0YXoNuOf/jVM/l2HPqgW/VCQtx7uSLhJMS9l70H8tSrr57Hd2Hf/Bhd7EiI25r9WSqUhLh3cO/798bkZhLituXJx7JNK7V3LiFuO3bvSKmHqUWBTkLclpy1UbedanuXrynE7UiI28j0JylVvWAb25+hjtUHCXGbOLjySSr//gAv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MnfDvDWwu327eNYR5WfRnB/NsLl+M6ytQ/5ziG4fQ3T7GKLbxyDdOpUt6JRFtwzUrWxvQ1l0y0G6bY/ophHdPkbDfo9s8+fk/1067rtY88+IgiAIgiAIgiAIgiAIgiAIgiAIgiAIgiAIgiAIgiAIgiAIgiAIgiAIgiAIgiAIgvAX8j827uSGa3J6jgAAAABJRU5ErkJggg==" alt="Image 1">
      <img id="image2" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcS4bJcZn1DhxbB02nhIwg5fq1-GY_KnnEscAA&usqp=CAU" alt="Image 2">
    </div>

    #image1 height == 162px

    #image2 height == 266px

    Login or Signup to reply.
  2. I don’t think this is exactly possible just with CSS, but the closest thing you want is this:

    .container {
      display: flex;
      margin: 20px 0;
      height: 100px;
    }
    
    .container>img {
      object-fit: cover;
      flex-grow: 1;
      min-width: 0;
    }
    <div class="container">
      <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsIAAA7CARUoSoAAAAU6SURBVHhe7dq/TxtnHMfxb6rYIjJFuEU0kSwhFJShM/4PGFCnboysWbqgbszdKpYMZfWYf6BKJf8HZGaIqBCSpaSWqS2CU8tGSr/P/cDG2IGg+2AD75eEOI440T33vrvn7vLouLTy2YCMfZN8BzJFWJAgLEgQFiQICxKEBQnCggRhQYKwIEFYkCAsSBAWJAgLEoQFCcKCBGFBgrAgQViQICxIEBYkCAsShAUJwoIEYUGCsCBBWJAgLEgQFiQICxKEBQnCggRhQYKwIEFYkCAsSBAWJAgLEoQFCcKCBGFBgrAgQViQICxIEBYkCAsShAUJwoIEYUGCsCBBWJAgLEgQFiQICxKEBQnCggRhQYKwIEFYkCAsSBAWJAgLEoQFCcKCBGFBgrAgQViQeHRcWvmcLE9Yz6rNf2yj3TErPLPjYiFZP6htW7X3Vkl+uiS/YG8X5205+TF12GnZq5OGVbrJCpu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AChAkvQJjwAoQJL0CY8AKECS9AmPAChAkvQJjwAoQJL0CY8AKECS9AmPAChAkvQJjwAoQJL0CY8AKECS9AmPAChAkvQJjwAoQJL0CY8AKECS9AmPAChAkvQJjwAoQJL0CY8AKECS9AmPAChAkvQJjwAoQJL0CY8AKECS9AmPAChAkvQJjwAoQJL0CY8AKECS9AmPAChAkvQJjwAoQJL0CY8AKECS9AmPAChAkvQJjwAoQJL0CY8AKECS9AmPAChAkvQJjwAoQJL0CY8AJElfI/eLXJj7ruMHwAAAAASUVORK5CYII=">
    </div>
    <div class="container">
      <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAcIAAAGQCAYAAAA9XmC5AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsIAAA7CARUoSoAAAArPSURBVHhe7dy/a13nAcfhN4mlKlUiLFuImApMGpGhU6HWf2BoyNQto1d76GIKHbx0yRbcIUO9ejR06BQcEP0H5CWLh+BWGERMhRwJxbe9kdS659xzr2VJ19K5zpUx/j4PHHzuL/m8y/nwnl9vPV5YfFoAINTb/X8BIJIQAhBNCAGIJoQARBNCAKIJIQDRhBCAaEIIQDQhBCCaEAIQTQgBiCaEAEQTQgCiCSEA0YQQgGhCCEA0IQQgmhACEE0IAYgmhABEE0IAogkhANGEEIBoQghANCEEIJoQAhBNCAGIJoQARBNCAKIJIQDRhBCAaEIIQDQhBCCaEAIQTQgBiCaEAEQTQgCiCSEA0YQQgGhCCEA0IQQgmhACEE0IAYgmhABEE0IAogkhANGEEIBoQghANCEEIJoQAhBNCAGIJoQARBNCAKIJIQDRhBCAaEIIQDQhBCCaEAIQTQgBiCaEAEQTQgCiCSEA0YQQgGhCCEA0IQQgmhACEE0IAYgmhABEE0IAogkhANGEEIBoQghANCEEIJoQAhBNCAGIJoQARBNCAKIJIQDRhBCAaEIIQDQhBCCaEAIQTQgBiCaEAEQTQgCiCSEA0YQQgGhCCEA0IQQgmhACEE0IAYgmhABEE0IAogkh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vcYeGT2KZ5AvSL4AUG0/xy3ChjMvbGz522CdRW42njsCu9ju/Sljfk/2SeAFtF8AIDacPdBqpTTW8vvuqoefHWkXIva6/jP6A29SSm6yu7I3G2+HJzM8/jwtRK9ctPaZvnCdAvghcYQCvxoL662+FuA+tex9O2e1E7XbzV6/j3lbcmq2L3QFy/tC9O3h5tRu8Hb0n2sfo/T4B+ErzAwFm89k/MlgeT++Nk2zDbE9+Ue2g7XXx179/q8+t7WXsd314Vu6vFuJEidt/uKx5qRu/04ieO3u2ZJ0C/CV5gwFQPZihXd1sfNPGu8Ym99dfZyRdRX7Rc1/5WZr2O76jto3mb0fupbds8AfrIo4WBgbL+2N22YbnR+l7aIo7HJnfH0Xgdj2ZW63t/2905odfxW6V27UU8+KvxZu51zNbK+Q7HxNju6tzxz+PcmeZ32anzBOiW4AUGSPMhDhMzh+Nc671321or4vFl3Jh+VcVcqQzH818Vn22397fX8VuhOceO3ov9nThPgO4JXgAAUrOHFwCA1AQvAACpCV4AAFITvAAApCZ4AQBITfACAJCa4AUAIDXBCwBAaoIXAIDUBC8AAKkJXgAAUhO8AACkJngBAEhN8AIAkJrgBQAgNcELAEBqghcAgNQELwAAqQleAABSE7wAAKQmeAEASE3wAgCQmuAFACA1wQsAQGqCFwCA1AQvAACpCV4AAFITvAAApCZ4AQBITfACAJCa4AUAIDXBCwBAaoIXAIDUBC8AAKkJXgAAUhO8AACkJngBAEhN8AIAkJrgBQAgNcELAEBqghcAgNQELwAAqQleAABSE7wAACQW8R/j/GR6cDD9xgAAAABJRU5ErkJggg==">
    </div>
    <div class="container">
      <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAV4AAABGCAYAAACE2fxYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsIAAA7CARUoSoAAAAWZSURBVHhe7dy/T9toGMDxpycSpQ2NSC/iQIqEUFGHzuU/QCq6qVvHrCy3oG7MbKhLh2Nl7NbpRKX8BzAzVFQIKRK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hAksAIAwgQUAECawAADCBBYAQJjAAgAIE1gAAGECCwAgTGABAIQJLACAMIEFABAmsAAAwgQWAECYwAIACBNYAABhAgsAIExgAQCECSwAgDCBBQAQJrAAAMIEFgBAmMACAAgTWAAAYQILACBMYAEAhAksAIAwgQUAECawAADCBBYAQJjAAgAIE1gAAGECCwAgTGABAIQJLACAMIEFABAmsAAAwgQWAECYwAIACBNYAABhAgsAIExgAQCECSwAgDCBBQAQJrAAAMIEFgBAmMACAAgTWAAAYQILACBMYAEAhAksAIAwgQUAECawAADCBBYAQJjAAgAIE1gAAGECCwAgTGABAIQJLACAMIEFABAmsAAAwgQWAECYwAIACBNYAABhAgsAIKqU/wHAe60Qxt+dEwAAAABJRU5ErkJggg==">
    </div>

    Maybe the aspect ratio of the images is not maintained, but object-fit: cover makes the images not stretched and fill the space (Actual font size of all texts inside images is same)

    Login or Signup to reply.
  3. This can be done if you know in advance (or later, dynamically using JavaScript) the natural (original) width/height of your images.
    Such is a trivial task if you use modern tooling for frontend development, or a backend that can serve (besides the image tag) the necessary image data in attributes or expose the values). Otherwise you might want to rely (as already mentioned) on JavaScript.
    Two examples ahead:

    Using CSS flex, and CSS var()

    in where calc() is used to calculate the flex-grow value given the --w and --h CSS vars for width and height:

    .container {
      display: flex;
      outline: 1px solid #000;
    }
    
    .container img {
      flex-grow: calc(var(--w) / var(--h));
      width: 0;
    }
    <div class="container">
      <img src="https://placehold.co/100x100/f08/fff" style="--w:100; --h:100;">
      <img src="https://placehold.co/200x40/0f8/fff" style="--w:200; --h:40;">
      <img src="https://placehold.co/150x200/8f0/fff" style="--w:150; --h:200;">
      <img src="https://placehold.co/250x200/f80/fff" style="--w:250; --h:200;">
    </div>
    
    <div class="container">
      <img src="https://placehold.co/90x20/f80/fff" style="--w:90; --h:20;">
      <img src="https://placehold.co/200x60/0f8/fff" style="--w:200; --h:60;">
    </div>
    
    <div class="container">
      <img src="https://placehold.co/80x100/08f/fff" style="--w:80; --h:100;">
      <img src="https://placehold.co/40x130/f08/fff" style="--w:40; --h:130;">
    </div>
    
    <div class="container">
      <img src="https://placehold.co/50x50/f08/fff" style="--w:50; --h:50;">
      <img src="https://placehold.co/99x99/8f0/fff" style="--w:99; --h:99;">
    </div>

    Using JavaScript

    if for some case you’re unable to know in advance the natural width/height of your images you could still rely on JavaScript in order to calculate the necessary flexGrow value, or in other words, assign dynamically the CSS vars --w and --h respective values using setProperty:

    document.querySelectorAll(".container").forEach(async(elCont) => {
    
      const elsImages = elCont.querySelectorAll("img");
    
      //stackoverflow.com/a/60949881/383904
      await Promise.all([...elsImages].filter(img => !img.complete).map(img => new Promise(resolve => img.onload = img.onerror = resolve)));
    
      elsImages.forEach(elImg => {
        elImg.style.setProperty("--w", elImg.naturalWidth);
        elImg.style.setProperty("--h", elImg.naturalHeight);
      });
    
    });
    .container {
      display: flex;
      outline: 1px solid #000;
    }
    
    .container img {
      flex-grow: calc(var(--w) / var(--h));
      width: 0;
    }
    <div class="container">
      <img src="https://placehold.co/100x100/f08/fff">
      <img src="https://placehold.co/200x40/0f8/fff">
      <img src="https://placehold.co/150x200/8f0/fff">
      <img src="https://placehold.co/250x200/f80/fff">
    </div>
    
    <div class="container">
      <img src="https://placehold.co/90x20/f80/fff">
      <img src="https://placehold.co/200x60/0f8/fff">
    </div>
    
    <div class="container">
      <img src="https://placehold.co/80x100/08f/fff">
      <img src="https://placehold.co/40x130/f08/fff">
    </div>
    
    <div class="container">
      <img src="https://placehold.co/50x50/f08/fff">
      <img src="https://placehold.co/99x99/8f0/fff">
    </div>

    Acknowledgment and documentation:

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search