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

238
Visualizações
Button text only visible when hovered over with mouse

The text on the button (Remove in this case) is only visible when hovered over with mouse. It's an angular project and it won't get overridden even if I try to give css for .btn as

background-color: blue;
Button's text not visible Button's text visible only when hovered over with mouse
enter image description here enter image description here

This is my html code for the button :

<button (click)="remove(item)" class="btn btn-primary btn-sm mt-2" style="color: white;">Remove</button>

This is the css for buttons in style.css :

 .btn-info{
    color:#fff;
    background-color:#0da8e4!important;
    border-color:#0da8e4!important
}

a.primary-btn{
    background:#05143f;
    padding:7px 20px;
    text-align:center;
    display:inline-block;
    color:#fff;
    border-radius:2px;
    font-size:14px;
    margin-top:5px
}
a.primary-btn:hover{
    background:#0da8e4;
    color:#fff
}

.active-link {
  font-weight: bold;
}
over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

You have btn-primary on your html button tag as class, but in your css its primary-btn, so actually your css should do nothing to solve your problem.

As to why your text doesnt show, from what I can see, you have colored the text as white, while the button is also white, so the text should be showing, its more a problem of your background color.

Easiest solution would be :

<button (click)="remove(item)" class="btn btn-primary btn-sm mt-2" style="color: white; background-color: blue;">Remove</button>
over 4 years ago · Santiago Trujillo Relatório

0

I had a similar issue when the button was inside a table. Bootstrap classes for the table were interfering with the button bootstrap classes.

Please put the button inside <thead></thead> or <tbody></tbody>

<table class="table table-hover" style="cursor:pointer">
  <thead>
    <tr>
      <th style="width: 20%;"></th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>
        <button (click)="remove(item)" class="btn btn-primary">Remove</button>
      </td>
    </tr>
  </tbody>
</table>
over 4 years ago · Santiago Trujillo 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