DEV Community

Discussion on: April 9th, 2021: What did you learn this week?

Collapse
 
leob profile image
leob • Edited

I learned something yesterday which for me was a pretty "weird" discovery:

If you use CSS Flex and you want to (for example) right-align one particular item (while leaving the rest "default"), then guess what you can use ... "margin-left: auto"!

Pretty surprising, to me at least. More info here:

dev.to/samanthaming/flexbox-aligni...

Well so that wasn't what I expected really, I was looking for something like "align-self" or "justify-self" or whatever ...

Speaking of which - I can never remember which is which ("align-items" or "justify-content"), and I finally came across a way to somewhat easily remember which is which:

css-tricks.com/a-quick-way-to-reme...

Collapse
 
nickytonline profile image
Nick Taylor

Captain America saluting