Design comparison
Solution retrospective
Hello everybody,
This is my first attempt to html/css after learning for the past few weeks ( also to GitHub ) so please have mercy :) Two questions from the beginner.
Questions:
-
Which option is a better & more elegant: a) css (background-image) b) semantic html ( img src="" )
-
(units) Which solution is more useful : a) "rems" everywhere ( parent & childs ) b) mixed "rems" ( parents) & "ems" (childs)
I you have some time to look by more experienced eye at my code ( in general ) I would be very thankful for all kind of advices & remarks.
Thank you! Antek
Community feedback
- @T-NabeelPosted over 2 years ago
Hey Antoni, Great job on your first challenge! 🤙
Answer to your first question, which one better, IMG or CSS Bg? It really depends on the work you trying to do, follow this stack, you can get a better idea. Click here
Answer to your second question, Both rem and em have their strengths and weaknesses depending on again, the use case. So it is up to you to choose the suitable unit which will work best.
- em is relative to the font-size of parent.
- rem is relative to the HTML (root) font-size.
Hope this helps, Keep up the good work! 👍
Marked as helpful1
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