Design comparison
Solution retrospective
the part for tablet version is not in the challenge
Community feedback
- @yacineKahlerrasPosted about 2 years ago
Hey @miller-vrg good job on the design, I have a few suggestions which might be helpful to you
-add
min-height: 100vh;
to the body so it takes the minimum full height of your content.-add
object-fit: cover;
to both the images so it doesnt appear stretched.-so that the attribution don't affect you element's positioning add
.attribution { font-size: 11px; text-align: center; position: absolute; bottom: 1rem; }
this way it will be at the bottom of your page but doesn't effect anythingMarked as helpful1 - @correlucasPosted about 2 years ago
👾Hello Miler Vargas, congratulations for your new solution!
I saw that you've used
grid
in the body to give it the alignment but you can use the grid for the layout, I think the best way to build this component with two columns is by usingGRID LAYOUT
since it is simpler to manage the columns and then create the media query for mobile. Here’s the steps to create it withgrid
create the main block to hold all the content (you can use<main>
to wrap), set itswidth
asmax-width: 900px
(it's the container size) anddisplay: grid
/grid-template-column: 1fr 1fr
(this means that your component will have two columns with 50% of the container width each thats 450px).Then to create the mobile version, all you need to do is to change the container flow vertically with
grid-template-column: 1fr
.✌️ I hope this helps you and happy coding!
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