I have the code bellow with two issues:
The big image is not centered. I want the small images(thumbs) to remain align to the left.
min-width
onclass th
acts like amax-width
and the realmax-width
doesn't matter.
What I want is the th
to 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.
.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>