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

142
Vistas
css - not able to vertical center span with font-style "Luckiest Guy"

I find that I am not able to vertical center span with font-style "Luckiest Guy".
enter image description here

I tried to apply display: flex;align-items: center; on the span but not working.

App.vue

<template>
  <div id="app">
    <span>Luckiest Guy Font</span>
  </div>
</template>

<script>
export default {
  name: "App",
};
</script>

<style lang="scss">
@import url("https://fonts.googleapis.com/css2?family=Luckiest+Guy&display=swap");

#app {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  background-color: grey;
  margin-top: 60px;
  span {
    font-family: "Luckiest Guy", Helvetica, Arial, sans-serif;
    font-size: 19px;
    line-height: 19px;

    display: flex;
    align-items: center;
  }
}
</style>

CodeSandbox:
https://codesandbox.io/s/cool-browser-lh9f8?file=/src/App.vue:441-453

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Your code doesn't have problem and it works fine. Maybe you have some other classes that affect on this tag.

Also you can set vertical-align:baseline; in span tag styles.

.span-style{
display:flex;
align-items:center;
justify-content:center;
border:1px solid black;
height:40px;
vertical-align:baseline;
}
<div>
<span class="span-style">
Hello world
</span>
</div>

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