Skip to content

web and graphic design yoko ishioka logo

Web & Multimedia ( Designer + Developer )

  • Projects
  • Resume
  • Articles
  • Contact
  • Projects
  • >

CSS Tip: How to center text vertically and horizontally using Flexbox

February 24, 2017 |
  Yoko Ishioka

If you want to center text horizontally and vertically on an object with fluid dimensions, use CSS Flexbox to accomplish your goal:

.parent-container {
   display: flex;
   flex-wrap: nowrap;
   justify-content: center;
   align-items: center;
}

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on LinkedIn (Opens in new window) LinkedIn

Post navigation

Previous Previous post: Rauwolf: Geometric mirrored rays
Next Next post: 9-Ball Scoring App

Categories

  • Analytics
  • B2E
  • Blog
  • CSS
  • JavaScript
  • jQuery
  • Learning
  • Magento 2
  • PHP
  • Portal
  • Projects
  • Video
  • Web Design
  • Web Development
  • WordPress

Email notifications, anyone?

  • Projects
  • Resume
  • Articles
  • Contact