@bimalmagar10
Posted
Hey!You did great job building it and your build looks well! If you forgot about how we can center things wihtout flex then here's my reminder for you:
-You can center text or inline elements using text-align:center
-You can also center the block or inline block elements having a certain width with margin:0 auto
-You can center any elements by posiitioning them like posiition:absolute
top:50%
left:50%
and transform:translate(-50%,-50%)
.This is just a reminder for you.These values may differ with situations you are facing with.And also the element you're centering should be positioned with relative to its parents or any elements i.e they should contain the position:realtive
code.
This is all about what I know.I hope this may help and get you.
Happy Coding!
@opakholis
Posted
hey @bimalmagar10 thank you very much. but you forgot one more thing, the grid. as an alternative if i'm bored with flexbox, which way to use it is with display: grid;
and place-items: center;
. I also often use it if it is necessary. happy coding. cheers!
@bimalmagar10
Posted
@opxop Yeah!that's right. Thank you for reminding me.MEanwhile shorthand for align-items
and justify-items
i.e place-items
is great.But just for centering the items, using grid
is a bit weird isn't it?As it's more focused on two or more dimensional layouts.
Note:I like your photo and you're beautiful.Let's hook up in facebook if you don't mind 😉