C
C
Caramba662019-07-26 10:49:00
css
Caramba66, 2019-07-26 10:49:00

How can I make sure that the images do not collapse when the page is reduced?

There is the following code:

<div class="flex">
      <div class="div"><a href=""><img src="img/online.jpeg" alt=""></a><a href="">Текс 1</a></div>
      <div class="div"><a href=""><img src="img/ves.jpg" alt=""></a><a href="">Текс 2</a></div>
      <div class="div"><a href=""><img src="img/ias.jpg" alt=""></a><a href="">Текст 3</a></div>
  </div>

.flex{
    display: flex;
    justify-content: space-around;
    margin-bottom: 2%;
    width: 58%;
    margin: auto;
}
.flex img{
    width: 230px;
    height: 166px;
    max-width: 100%;
    height: auto;
}
.flex div{
    display: flex;
    justify-content: space-around;
    align-items: center;
}
.flex a{

}
.flex a{
    margin-bottom: 2%;
    font-size: 1.2em;
    text-decoration: none;
    color: black;
    font-weight: 600;
}
.flex a:hover{
    color: #202ab3;
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
fallus, 2019-07-26
@fallus

Give them flex-grow: 0;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question