Design comparison
Solution retrospective
-For this i mostly used Flexbox -I had a little dificult time while building the mobile version I would like to recieve some feedback and recommendations Thank you!
Community feedback
- @correlucasPosted over 2 years ago
πΎHello Flor, congratulations for your first solution and π welcome to the Frontend Mentor Coding Community!
You've used
FLEX
to create this component this is fine, since is working. In my opinion a better approach is by usingGRID
.For example to build this component with 2 columns all you need to do is create a main block to hold all the content (you can use
<main>
to wrap), set itswidth
asmax-width: 900px
(its the container size) anddisplay: grid
/grid-template-column: repeat(2, 1fr)
(this means that your component will have two columns with 50% of the container width each thats 450px).π I hope this helps you and happy coding!
Marked as helpful0 - @warrenleePosted over 2 years ago
Hi Flor, good job on this challenge! Desktop looks perfect but here's a tip on how to start getting the layout respond for mobile.
Starting with
#conteiner
changewidth
to100%
andheight
toauto
and addflex-direction: column
. On your#img
change the width to100%
and since you are usingbackground-image
you'll need to set the correctbackground-image
url
, add eitherpadding-top
to give the element some height or you can use the newly introducedaspect-ratio
. Spotted a minor mistake,background-repeat
should be set tono-repeat
rather thannone
Next, you'll need to sort out the
border-radius
. I'd recommend to apply it on the#conteiner
and addingoverflow: hidden
to make the rounded corners visible. I would also recommend using thepicture
tag instead ofbackground-image
as you can use media queries to set the image you want to show.example:
<picture> <source srcset="/desktop-img.jpg" media="(min-width: 768px;)"> <img src="/mobile-img.jpg"> </picture>
I hope this helps!
Marked as helpful0 - @de-furkanPosted over 2 years ago
Hey looks great. To improve on the mobile aspect - consider doing the following:
-
try mobile first approach - build from bottom up - from smaller devices and up to larger devices. This is a great approach.
-
Also, consider using media queries to add in responsiveness to your design.
Otherwise, great effort, looks nice :)
Marked as helpful0 -
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