Responsive news homepage using CSS Flexbox, Grid and basic JavaScript
Design comparison
Solution retrospective
Hello there!
This is my first time in the front-end development world and also my first attempt to create a webpage. For this project, i used pure CSS, like flexbox and grid, and HTML with a little JavaScript for the mobile menu.
Although i am a novice, every constructive critic is welcome here since it is important for my technical development. P.S: I would be very pleased if some tips were given along with the comments!
Hope you all like it :)
Community feedback
- @amalkarimPosted almost 2 years ago
Hi Eduardo. Great solution!
I'm just curious as why you chose to use
vh
unit to definefont-size
, like for examplefont-size: 2.6vh;
. When I visit your page using mobile view, the text is too small to read. I think it's better to definefont-size
inhtml
usingpx
, and then define it in other element usingrem
. For example:html { font-size: 16px; } h1 { font-size: 2rem; } footer { font-size: 0.8rem; }
Let me know what you think.
1@ETUUUPosted almost 2 years ago@amalkarim Hey, thanks for the comment!
Well, I got your point. I indeed tried to use
px
,em
andrem
for the font sizes and it worked well, but only when the page was static. Whenever I tried to use the google dev tools to view what the page would look like on a cellphone, the written content was weird and small most of the times.I saw some people on StackOverflow forums saying that using
vh
,vmin
and other measures like this could bring better results, so I tested and it seemed to work properly.I will take some time to give another look at the code and improve this :)
0@amalkarimPosted almost 2 years ago@ETUUU
Really? Thanks! This is news to me. Usually, when I use px or rem, the text would look nice whether in desktop or mobile view. But now I know there's actually another method to define the size unit of the text that could work nicely even though it sounds weird at first. It's nice to know that! 😃
1
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