3-Column-Preview using html and css
Design comparison
Solution retrospective
Any feedback on code would be greatly appreciated!
Community feedback
- @vanzasetiaPosted over 2 years ago
Hello, Michelle! π
Good effort on this challenge! π Your solution looks great! π
However, I recommend refactoring the CSS by following this guide.
- First, you don't need absolute positioning. It works well here, however, in a large project (like landing page challenges), it would be a pain to position every element with absolute positioning, especially in making the layout responsive. So, to make the card in the middle of the page you can use flexbox instead of
margin
andposition
properties and usepadding
to control the position of the element inside the card. - Second, the element that wraps all the cards only needs a
max-width
to prevent the cards from becoming too large. - Third, every card doesn't need
width
andheight
. Forwidth
, since it's a block element it will for sure havewidth: 100%
so it will follow themax-width
of the parent element. Forheight
, let the element inside it controls the height of it. After that, addpadding
to prevent the element inside it from touching the edges of the card.
For the HTML, I recommend leaving the
alt
empty for all icons because they are only for decoration purposes.That's it! Hope this helps.
2@MichelleMonrrealPosted over 2 years ago@vanzasetia Thanks so much this definitely helps! Really appreciate it!
0 - First, you don't need absolute positioning. It works well here, however, in a large project (like landing page challenges), it would be a pain to position every element with absolute positioning, especially in making the layout responsive. So, to make the card in the middle of the page you can use flexbox instead of
- @ahoin001Posted over 2 years ago
I would definitely check out flexbox to make things a little easier! Makes centering and laying out elements nice and easy
https://css-tricks.com/snippets/css/a-guide-to-flexbox/
Really good visual practice tool https://flexboxfroggy.com/
1@MichelleMonrrealPosted over 2 years ago@ahoin001 Thanks! I'm doing a css course on udemy so I'm practicing what I have learn so far just to get the hang of certain things. And about to get to the flexbox section of the course. But I will definitely check these links out! Thanks again!
0@ahoin001Posted over 2 years ago@MichelleMonrreal itβs a game changer for sure ! And your stuff is coming out awesome you got this!
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