Skip to content

Instantly share code, notes, and snippets.

@ivanaugustobd
Last active September 30, 2018 15:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ivanaugustobd/4aba9a009ff67e0df14c4ccc0268566d to your computer and use it in GitHub Desktop.
Save ivanaugustobd/4aba9a009ff67e0df14c4ccc0268566d to your computer and use it in GitHub Desktop.
<li class="products-grid-item">
<img class="products-grid-item__image">
<div class="products-grid-item__description">[..]</div>
<span class="products-grid-item__price">[..]</span>
<button class="button button - buy">[..]</button>
</li>
.products-grid-item {
display: flex; // isto irá nos permitir trabalhar melhor com a distribuição dos elementos internos
flex-direction: column; // empilha os elementos
&__description {
flex-grow: 1; // instrui o navegador a usar o espaço disponível entre o preço e o "Comprar" para a descrição, deixando o "Comprar" sempre rente à parte inferior
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment