Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

136
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!