Mohammad Ebrahimi• 250
@moheb2000
Submitted
I have some problems with centering elements on screen. I know how I can center an element with flexbox but in small screens, I see some weird results. Thanks!
@NimaFrEeMaN
@moheb2000
Submitted
I have some problems with centering elements on screen. I know how I can center an element with flexbox but in small screens, I see some weird results. Thanks!
@NimaFrEeMaN
Posted
Hi, you can center your elements by giving your element these properties
{ position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
Marked as helpful