Design comparison
Solution retrospective
I'm not sure about the media section and if it should be used or if it could be done without it. I'm also not sure if i used right responsive units. I tried to use more semantic elements than just div, but I don't really know where to use which. I appreciate any advice.
Community feedback
- @eddybproPosted over 1 year ago
Hi, Joutee
Congratulation on finishing this challenge, I hope it was fun.
For the code here are some suggestions that might help improve it:
- CSS code:
body{ /*add this line*/ overflow: hidden; }
- JS code:
//You did not check for the leap years, eg: 2000; // here is a way to deal with it: if(year % 400 == 0 || (year % 100 != 0 && year % 4 == 0)){ //leap year //Update the value of the second month daysOfMonths[1] = 29; }else{ daysOfMonths[1] = 28; } //You can also add the prefix 0 in front of values in the inputs like this: inputEle.addEventListener('change', ()=>{ if(inputEle.value.length==1){ let val = inputEle.value; inputEle.value = '0' + val; } })
Tips
For the
CSS UNITS
, Theem
unit is relative to the font size of its parent element, while therem
unit is only relative to the root font size of the HTML document. The “r” in rem stands for “root”.That's it HAPPY CODING
Marked as helpful0@JouteePosted over 1 year ago@eddybpro Thanks for reply, I 'm aware of leap years. I didn't want to bother about it because i already did it before and wanted to jump to other projects. Also thans for advice.
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