tell me the best way to make a div that contains images have fixed size?

If you are trying to stick to Bootstrap, this solution might help

.album {
  display: flex;
  align-items: center;
  justify-content: center;
}

.imagesContainer {
    max-width: 400px;
    max-height: 700px;
    overflow: hidden;
}

.imagesContainer img {
    width: 100%;
    min-height: 100%;
}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">

<div class="album">
  <div class="imagesContainer">
      <div class="row mt-3">
          <div class="col px-2">
              <img src="https://fujifilm-x.com/wp-content/uploads/2019/08/x-t30_sample-images02.jpg" class="img-fluid" alt="1">
          </div>
          <div class="col px-2">
              <img src="https://fujifilm-x.com/wp-content/uploads/2019/08/x-t30_sample-images02.jpg" class="img-fluid" alt="1">
          </div>
      </div>
      <div class="row mt-3">
          <div class="col"><img src="https://fujifilm-x.com/wp-content/uploads/2019/08/x-t30_sample-images02.jpg" alt="3"></div>
      </div>
  </div>
</div>

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top