Centering Elements with Flexbox Samantha Ming on August 26, 2019 The biggest CSS headache is "How do I vertically center something". Throw away your migraine pills, it's now been solved with Flexbox! .parent... Read full post Collapse Expand Nicola Nicola Nicola Follow Sr. Frontend Software Engineer, creating user interfaces for Game and Web applications. UX and design passionate. Email nicolacastellanidev@gmail.com Location Italy Work Sr. Frontend Software Engineer @ Equixly Joined Aug 5, 2019 • Aug 26 '19 Dropdown menu Copy link Hide You have different ways to handle this, I'll give you a cool tip: Using place-[what] instead of align and justify: .fully--centered { display: flex; place-content: center; place-items: center; } Enter fullscreen mode Exit fullscreen mode this is equal to: .fully--centered { display: flex; align-content: center; justify-content: center; align-items: center; justify-items: center; } Enter fullscreen mode Exit fullscreen mode But with less css, this is cool when you have to define different complex flexbox layouts, and you want to save some lines of css. CONS: obiviously IE doesn't support this shorthand. Collapse Expand Samantha Ming Samantha Ming Samantha Ming Follow Frontend Developer sharing weekly JS, HTML, CSS code tidbits 🔥Discover them all on samanthaming.com 💛 Location Canada Work Front End Developer Joined Dec 21, 2018 • Aug 26 '19 Dropdown menu Copy link Hide Super cool! Thanks for sharing! 🤩 Collapse Expand Ryan Smith Ryan Smith Ryan Smith Follow I'm a software engineer working as a full-stack developer using JavaScript, Node.js, and React. I write about my experiences in tech, tutorials, and share helpful hints. Location New York Work Software Engineer Joined Oct 16, 2018 • Aug 26 '19 Dropdown menu Copy link Hide Thanks for the tip, I did not know about the place- shorthands! Collapse Expand Rae Liu Rae Liu Rae Liu Follow I like to share ideas and snippets! Location Austin, TX Work Software Engineer (front-end) Joined Aug 27, 2019 • Aug 27 '19 Dropdown menu Copy link Hide Thanks for the tip!!! I didn't know place- before. A note for developers who are still working on IE - it doesn't support on either Edge or IE Collapse Expand Nicola Nicola Nicola Follow Sr. Frontend Software Engineer, creating user interfaces for Game and Web applications. UX and design passionate. Email nicolacastellanidev@gmail.com Location Italy Work Sr. Frontend Software Engineer @ Equixly Joined Aug 5, 2019 • Aug 27 '19 Dropdown menu Copy link Hide I know this is a big mess, but fortunately I've maded a mixin to handle this: dev.to/nicolalc/a-mixin-to-rule-th... Samantha Ming Samantha Ming Samantha Ming Follow Frontend Developer sharing weekly JS, HTML, CSS code tidbits 🔥Discover them all on samanthaming.com 💛 Location Canada Work Front End Developer Joined Dec 21, 2018 • Aug 27 '19 Dropdown menu Copy link Hide Whoa!! Nice one! I’ll add this to the code notes 👏 thanks for sharing 😊 Collapse Expand Abdullah Furkan Özbek Abdullah Furkan Özbek Abdullah Furkan Özbek Follow Front End Developer 👨🏻💻 | Cosmos Enthusiast 🌌 | Loves React and Javascript 🧡 Email abdullah.furkan.ozbek@gmail.com Location Istanbul Education Istanbul University Computer Engineering Work Front End Developer Joined Jul 10, 2019 • Aug 30 '19 Dropdown menu Copy link Hide That sounds amazing Collapse Expand Abdullah Furkan Özbek Abdullah Furkan Özbek Abdullah Furkan Özbek Follow Front End Developer 👨🏻💻 | Cosmos Enthusiast 🌌 | Loves React and Javascript 🧡 Email abdullah.furkan.ozbek@gmail.com Location Istanbul Education Istanbul University Computer Engineering Work Front End Developer Joined Jul 10, 2019 • Aug 30 '19 Dropdown menu Copy link Hide That's great Samantha. Flexbox is really amazing to learn. Collapse Expand Samantha Ming Samantha Ming Samantha Ming Follow Frontend Developer sharing weekly JS, HTML, CSS code tidbits 🔥Discover them all on samanthaming.com 💛 Location Canada Work Front End Developer Joined Dec 21, 2018 • Aug 30 '19 Dropdown menu Copy link Hide Absolutely! I think it’s a must know at this point! 😄 Hope you will be following the new series! 😆 Collapse Expand Abdullah Furkan Özbek Abdullah Furkan Özbek Abdullah Furkan Özbek Follow Front End Developer 👨🏻💻 | Cosmos Enthusiast 🌌 | Loves React and Javascript 🧡 Email abdullah.furkan.ozbek@gmail.com Location Istanbul Education Istanbul University Computer Engineering Work Front End Developer Joined Jul 10, 2019 • Aug 30 '19 Dropdown menu Copy link Hide I will 😅 Collapse Expand Lucas H. Lucas H. Lucas H. Follow I make notes & summaries and post them here. Also sometimes post my thoughts. Location Netherlands Joined Aug 25, 2019 • Aug 26 '19 Dropdown menu Copy link Hide Thank you! <3 Collapse Expand Samantha Ming Samantha Ming Samantha Ming Follow Frontend Developer sharing weekly JS, HTML, CSS code tidbits 🔥Discover them all on samanthaming.com 💛 Location Canada Work Front End Developer Joined Dec 21, 2018 • Aug 26 '19 Dropdown menu Copy link Hide You’re welcome 😊 Collapse Expand T. T. T. Follow Full stack developer. Has excellent taste in sweaters. Work Software Engineer Joined Aug 24, 2017 • Aug 26 '19 • Edited on Aug 26 • Edited Dropdown menu Copy link Hide Thanks for this! Collapse Expand Samantha Ming Samantha Ming Samantha Ming Follow Frontend Developer sharing weekly JS, HTML, CSS code tidbits 🔥Discover them all on samanthaming.com 💛 Location Canada Work Front End Developer Joined Dec 21, 2018 • Aug 26 '19 Dropdown menu Copy link Hide You’re welcome! 😊 Code of Conduct • Report abuse For further actions, you may consider blocking this person and/or reporting abuse
You have different ways to handle this, I'll give you a cool tip:
Using place-[what] instead of align and justify:
this is equal to:
But with less css, this is cool when you have to define different complex flexbox layouts, and you want to save some lines of css.
CONS: obiviously IE doesn't support this shorthand.
Super cool! Thanks for sharing! 🤩
Thanks for the tip, I did not know about the
place-
shorthands!Thanks for the tip!!! I didn't know place- before. A note for developers who are still working on IE - it doesn't support on either Edge or IE
I know this is a big mess, but fortunately I've maded a mixin to handle this:
dev.to/nicolalc/a-mixin-to-rule-th...
Whoa!! Nice one! I’ll add this to the code notes 👏 thanks for sharing 😊
That sounds amazing
That's great Samantha. Flexbox is really amazing to learn.
Absolutely! I think it’s a must know at this point! 😄 Hope you will be following the new series! 😆
I will 😅
Thank you! <3
You’re welcome 😊
Thanks for this!
You’re welcome! 😊