Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

125
Visualizações
How can I fit a img into a div wholly?

.flexbox-item-1 {
  min-height: 300px;
  min-width: 300px;
  border: 3px solid red;
  overflow: hidden;
  /* background: url("./Zodiac_Logos_jpg/Aries_zodiac_logo.jpg"); */
  /* background-size: cover; /* fits the whole image inside */
}

#Aries_pic_1 {
  /* position: absolute; */
  /* left: 67.5px; */
  max-height: 100%;
  max-width: 100%;
}
<div class="flexbox-container">
  <div class="flexbox-item_one flexbox-item-1">
    <div>
      <a href="Aries_page.html" class="Get_1" target="_blank">
        <img src="./Zodiac_Logos_jpg/Aries_zodiac_logo.jpg" id="Aries_pic_1">
      </a>
    </div>
  </div>
</div>

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Use object-fit: cover; css style. Make sure to set width and height on the image for it to work.

<!-- you can set the height to whatever you like, even make it a flex item. -->
<div style="width: 200px; height: 100px;">
   <style>
     .my-image {
       width: 100%;
       height: 100%;
       object-fit: cover;
     }
    </style>

 <img class="my-image" src="your-image.extension" />

</div>

Then just put the div anyway and size it to whatever you want.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda