@CyrusKabir
Posted
hello my dear friend ♥ for your question this link may help you :
@Suhaan-Bhandary
Posted
@CyrusKabir Thanks for the reply, but I was talking about the mobile design in which the card is not centered but is just above the center.
What is the best way to align the card above the center? I have used margin top to do it in the solution.
@CyrusKabir
Posted
hello my dear friend ♥ for your question this link may help you :
@Suhaan-Bhandary
Posted
@CyrusKabir Thanks for the reply, but I was talking about the mobile design in which the card is not centered but is just above the center.
@ahnge
Posted
You can also use flexbox to do it. You just got to give the parent container 100vh.
@Suhaan-Bhandary
Posted
@ahnge Thanks for the reply, I have done the same thing for centering the card in the desktop view, but I was talking about the mobile design in which the card is not centered but is just above the center.
@liezsm
Posted
Hi im no expert still in the learning process, but my suggestion is you can try setting your body's height to 100vh and then give it a display grid, place-items: center so the container will be automatically center and remove the 100vh from your container. I hope it helps. happy coding
@Suhaan-Bhandary
Posted
@liezsm Thanks for the reply I have used nearly the same approach for centering it in the desktop view, but I was talking about the mobile design in which the card is not centered but is just above the center.
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord