Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

296
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda