Design comparison
Solution retrospective
Hello everyone! š
Today I completed another Frontend Mentor Challenge. I am doing the #100DaysOfCode and today I wanted to do some Frontend. I only had to use some HTML and CSS for this solution , so it was a quick and fun excersise. I used a Mobile-First approach and later tried to adapt the styling to a Desktop view. Because the card had the same look on both devices, I only had to change a couple of lines.
āļø Question I now gave the main (/card) a max-width in rem. Is there a better solution to make the card desktop-friendly?
I would much like to become a better developer, so any advice you can give me is very welcome, also if it does not regard my specific question.
Have a nice day! šāāļø
Community feedback
- @NaveenGumastePosted almost 3 years ago
Hay ! Good Job Roy you are a pro user so your solution is nearly pixel perfect!
These below mentioned tricks will help you remove any Accessibility Issues
-> Add
Main
tag withclass
after body like it should be your container. For 1st heading orh1
tag, use header tag and then inside the header put yourh1
orh2
etc . But use header tag only once in main heading element.Keep up the good work!
Marked as helpful1@royschrauwenPosted almost 3 years ago@Crazimonk Thanks for the advice! I put the most important text, which had a class of header, inside a
h1
now.1 - @denieldenPosted almost 3 years ago
Hi Roy, the approach you used is great!
Only thing, rather than using the
main
tag and associating the properties for the body of the card I would create an internaldiv
with a dedicated class.Hope this help and happy coding ;)
Marked as helpful1@royschrauwenPosted almost 3 years ago@denielden Thank you for your feedback! Would you recommend removing the main tag altogether or putting the card-div inside the main tag?
1@denieldenPosted almost 3 years ago@royschrauwen put the
card-div
inside themain
tag ;)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