Design comparison
Solution retrospective
working with css flex
What challenges did you encounter, and how did you overcome them?media quarry responsiveness i use flex directions : column on mobile and flex direction :row on desktop
What specific areas of your project would you like help with?media quarry and css flex
Community feedback
- @danielmrz-devPosted 5 months ago
Hello there!
Congrats on completing the challenge! ā
Your project looks great!
I have a suggestion about your code that might interest you:
š You can use the
<picture>
tag when you have different versions of the same image.Using the
<picture>
tag will help load the correct image to the user's device, saving bandwidth and improving performance.Example:
<picture> <source media="(min-width: 768px)" srcset="{desktop image path here}"> <img src="{mobile image path here}" alt="{alternative text here}"> </picture>
I hope this helps!
Other than that, excellent work!
0 - @ShoaibShujaPosted 5 months ago
Amazing job my friend and here are some suggestions for you to make your code better:
-
First of all wrap all your code in a
section
ordiv
element especially if the design is basically covered in a box. -
Also don't use section element unless you are covering a bunch of elements which depends on each other or are related
-
Also, in this particular challenge it would have been better to use a
img
element inside your div instead of putting it as the background -
Another thing if you want to perfectly center a box inside the body element use these lines of code:
body { width: 100%; min-height: 100vh; display: flex; justify-content: center; align-items: center; }
- If you want to use media queries for smaller devices use
@media screen and (max-width: 650px)
and notmin-width
.min-width
applies the media query to devices which have a width more than the one you set the property equal to.
You code was overall good and simple. So keep learning and I wish you best of lucks.
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