1

Boa noite, tive uma dúvida para colocar os botões lado a lado. Coloquei o inline-block também, mas não consegui resolver.

.button {
  width: 10%;
  height: 50px;
  border: 0;
  cursor: pointer;
  background:#4169E1;
  border-radius: 20px;
  color: white;
  display: grid;
  align-items: center;
  justify-content: center;
}


.button:hover{
    background: #6495ED;
}
<div class="buttons">
        <a href="https://www.linkedin.com" target="blank" class="button" type="button">LinkedIn</a><br>
        <a href="mailto:[email protected]" target="blank" class="button" type="button">E-mail</a>
</div>

1 Resposta 1

1

Na classe buttons que é a classe da div onde tem os <a></a> coloquei um display:flex;

.button {
    width: 10%;
    height: 50px;
    border: 0;
    cursor: pointer;
    background:#4169E1;
    border-radius: 20px;
    color: white;
    display: grid;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
  
  }

  .buttons a { 
    text-decoration: none;    
  }
  
  .buttons {
    display: flex;  
  }

  .button:hover{
      background: #6495ED;
  }
<div class="buttons">
   <a href="https://www.linkedin.com" target="blank" class="button" type="button">LinkedIn</a><br>
   <a href="mailto:[email protected]" target="blank" class="button" type="button">E-mail</a>
</div>

1
  • na class buttons que é a class da div onde tem os <a></a> coloquei um display:flex; 20/01/2021 às 3:09

Você deve fazer log-in para responder a esta pergunta.

Esta não é a resposta que você está procurando? Pesquise outras perguntas com a tag .