Design comparison
Solution retrospective
I tried my best to use em
, rem
but still not sure if I had done it right.
What I find difficult is in the example, it seems that the image and the contents have the same width. I tried to make it that way but I kind of just estimating it.
Questions
- Is there a better way to implement the image radius?
- How to code with a mobile-first approach?
Community feedback
- @SurajHadagePosted almost 2 years ago
A better website designing start with structure. Break your elements such way they are more accessible and manageable. What i meant is, think about above example.
'''
<main> <picture></picture> <article></arrticle> </main> '''Now you can use flex.
As a beginner '<picture>' tag may be new to you.
But i highly recommend you to learn about here
With the help of picture tag you can insert two images with media query without any CSS
Marked as helpful0 - @AshxaryaPosted almost 2 years ago
Hi! 😊
I have some feedback to help you out.
CSS 🎨: I see that you have made use of variables in your root, you could try adding colours as variables as well for better ease of access in future projects.
You seem to have used em for font sized in some places, as general rule of thumb font sizes tend to use rem whereas spacing uses rem and em, you can learn more about this here.
As for your question on mobile first, there are many sources on youtube and other websites. A basic idea is to build your website around the mobile version first and then add a media query of let's say min-width:600px to then make the desktop version. Here is a video on why it might be better to do mobile first.
Have a great day/night ^^
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