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

295
Visualizações
Text content overflow its element tag

Here's the code. It's in Angular if that has something to do with it. The actual text height is overflowing the element that contains it.

#website-title {
    text-align: center;
    // font-family: "Roboto-Mono";
    font-size: 50px;
    margin: 0;
    position: absolute;
    top: 50%;
}
<p id="website-title">Poll App</p>

result:

enter image description here

I want the element to be the height of the content.

UPDATE: Narrowed the problem down to Angular Material. Everything is fine before doing ng add @angular/material. Then after adding material and restarting the server, I get the problem.

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

0

Be default, the p tag will expand to fit its content. So unless you have explicitly set the p tag height to be smaller than the text content, the text will not overflow.

Try checking to see if you have set a height on the p tag.

about 4 years ago · Juan Pablo Isaza Relatório

0

I found the solution but I don't know why it fixes the problem.

The problem had to do with Angular Material's typography (Angular material was installed). Sol'n - Go to index.html and remove the class="mat-typography" from the body tag.

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