@correlucas
Posted
👾Hello @ubongedem78, Congratulations on completing this challenge!
Great solution and great start! By what I saw you’re on the right track. I’ve few suggestions to you that you can consider to add to your code:
The approach you've used to center this card vertically is not the best way, because using margins you don't have much control over the component when it scales. My suggestion is that you do this alignment with flexbox
using the body as a reference for the container.
The first thing you need to do is to remove the margins used to align it, then apply min-height: 100vh
to make the body height size becomes 100% of the screen height, this way you make sure that whatever the situation the child element (the container) align the body with display: flex
and align-items: center
/ justify-items: center
.
body {
min-height: 100vh;
background-color: #ecf2f8;
padding: 20px;
font-family: 'Barlow Semi Condensed', sans-serif;
font-size: 13px;
display: flex;
align-items: center;
justify-content: center;
}
Something you can do is to improve your html markup using meaningful tags and replacing the divs. In this case, for example the main block/div that takes all the content can be wrapped with <main>
or section, if you think about = the cards you can replace the <div>
that’s wrapping each card with <article>
you can wrap the paragraph with the quote with the tag <blockquote>
this way you'll wrap each block of element with the best tag in this situation. Note that <div>
is only a block element without meaning, prefer to use it for small blocks of content inside bigger blocks wrapped with some better markup.
✌️ I hope this helps you and happy coding!