Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Advice Generator App using API

@Suhaan-Bhandary

Desktop design screenshot for the Advice generator app coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
  • API
2junior
View challenge

Design comparison


SolutionDesign

Solution retrospective


What is the best way to align the card above the center? I have used margin top to do it in the solution.

Community feedback

CyrusKabir 1,885

@CyrusKabir

Posted

hello my dear friend ♥ for your question this link may help you :

1

@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.

0

@ahnge

Posted

You can also use flexbox to do it. You just got to give the parent container 100vh.

1

@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.

0
liezl 190

@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

1

@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.

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join our Discord community

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