1

I have the code bellow with two issues:

  1. The big image is not centered. I want the small images(thumbs) to remain align to the left.

  2. min-width on class th acts like a max-width and the real max-width doesn't matter.

What I want is the thto not get smaller than the min-width, even if the big image is smaller.

Also not go more than max-width if there are many thumbs. The thumbs should wrap bellow.

For the example I use pixels, but maybe use rem,% to avoid issues on smaller screens.

enter image description here

.content {
  display: flex;
  flex-direction: row;
  border: 1px solid red;
  }
.th {
   display: flex;
   align-items: flex-start;
   flex-direction: column;
   margin: 0 30px 0 0;
   min-width: 30%;
   max-width: 60%;
   border: 1px solid blue;
  }

.cimage img{
   padding:10px;
   max-height: 200px;
   max-width: 200px;
}

.thumbs { 
 display: flex;
 justify-content: flex-start;
}

.thumb { 
  margin: 5px 5px 0 0;
}
<div class="content">
  <div class="th" >
    <div class="items" >
      <div class="item">
        <div class="cimage"><img src="https://via.placeholder.com/200"/></div>
      </div>
    </div>
    <div class="thumbs">
      <div class="thumb"><img src="https://via.placeholder.com/50"/></div>
      <div class="thumb"><img src="https://via.placeholder.com/50"/></div>
      <div class="thumb"><img src="https://via.placeholder.com/50"/></div>
      <div class="thumb"><img src="https://via.placeholder.com/50"/></div>
      <div class="thumb"><img src="https://via.placeholder.com/50"/></div>
      <div class="thumb"><img src="https://via.placeholder.com/50"/></div>
   </div>   
  </div>
  <div class="text">
             Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publish
</div>
user3541631
  • 3,686
  • 8
  • 48
  • 115

0 Answers0