Design comparison
SolutionDesign
Solution retrospective
I would like to know an efficient way to centre div's
Community feedback
- @SoniBasantPosted over 1 year ago
Hi, 👋 Your project is good.
As for your question of center a div-
display: flex; align-items: center; justify-content: center; min-height: 100vh;
Use above code in body.
Remove
min-height: 100vh;
if using elsewhere.-
Use
text-align: center;
in p and h5 -
Change h5 to h1 as one heading is necessary.
-
Wrap your div of
class="card"
in<main></main>
tag to remove landmark error. -
Wrap your div of
class="attribution"
in<footer></footer>
tag to remove landmark error.
Hope I am helpful. 🙋♂️
Marked as helpful0@ObiechinaJefferyPosted over 1 year agoThank you @SoniBasant this was very helpful
0 -
Please log in to post a comment
Log in with GitHubJoin 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