Last active
September 30, 2018 15:58
-
-
Save ivanaugustobd/4aba9a009ff67e0df14c4ccc0268566d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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