Four card feature section master Responsive with SASS and BEM
Design comparison
Solution retrospective
Hi everyone I have so much fun doing this project but I feel like I can do it better not using margin for the cards especially for set the image in the right place, If anyone know a better way to put the image without using margin I really appreciate it
I put the specific part of my code that I would like to have some feedback
.article {
display: flex;
flex-direction: column;
padding: 1.875rem;
padding-bottom: 1.25rem;
}
.article__h2 {
font-size: 1.2em;
}
.article__p {
font-size: 0.9em;
margin-top: 0.25rem;
}
.article__img {
align-self: flex-end;
margin-top: 4rem;
width: 3.4375rem;
}
Community feedback
- @catherineisonlinePosted almost 2 years ago
Why do you think using margins would be bad? Just curious. Margins are a great way usually for me to move things around. Also, what I do sometimes if let's say I want some image to move around along with the main container, you can also set it to absolute, set the parent container to relative and move the image anywhere and force it to at least stay inside the parent container.
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