Design comparison
Solution retrospective
Was using em in the media query the best solution to change the font-size?
Community feedback
- @MohamedAridahPosted over 2 years ago
Hello @tbrownlee, you did Great for this challenge, it's also Responsive so good job.๐๐
-
your styles to
.main
is extra and has no purpose. So Remove it. -
using
flex
with the<img>
is also can be Removed. the<img>
element isn't parent for an any element sodisplay: flex
will do nothing. -
instead of giving
width
property to the.text
or the<img>
you can just let them take100%
of the width and usepadding
property to control and give the outer space around the.container
. -
it's better to use
rem
units forfont-size
and somethings like that.em
is relative to the font-size of its direct or nearest parent .rem
is relative to the HTML (root) font-size. Read this Article for better understanding. -
you can see My solution for this challenge it may be helpful for you..!
I hope this wasn't too long for you, hoping also it was useful๐.
Goodbye and have a nice day.
Keep coding๐
Marked as helpful1@tbrownleePosted over 2 years ago@MohamedAridah thanks for your advice again!
I fixed the problems you mentioned. I also swapped some css properties between body and main to keep main.
I changed em to hard-coded px. I'll use rem on my next problem to figure it out and then I'll loop back and update this solution.
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