Any feedback desired :)
1Hibiki1
@1Hibiki1All comments
- @luckosrSubmitted over 4 years ago@1Hibiki1Posted over 4 years ago
span is an inline element, and div is a block element, so it is a bad idea to nest a div inside a span. Block elements take up full width and starts on a new line, whereas inline elements continue on the same line and take up only as much width as necessary.
More information about inline and block elements:
https://www.w3schools.com/html/html_blocks.asp Also, looking at your code, you seem to have used the span as a "wrapper". It is always a better idea to use a div in such cases. Good luck!2 - @Kotaro666-devSubmitted over 4 years ago
Is there anyone who knows why the preview of my work on FrontEnd Mentor looks different from what it is supposed to be?
It looks like squashed from the bottom of the page as if there is some huge margin-bottom.
@1Hibiki1Posted over 4 years agoI think the preview looks squashed because you used vh? As far as I know, what that would do is fill the height of the viewport, not more. Frontend Mentor took the screenshot of their 'preview', which has a shrunken height due to the header and stuff. Since you used vh, if you shrink the browser in height it will try to fill only that space(i.e, shrink your page in height). It's almost like it's height responsive. That may cause a lot of issues. This is how it will look on a tablet: https://drive.google.com/file/d/1_PgUXCWEJDwRw6PZBDU1t93jaSpPyLtj/view?usp=sharing
I suggest you use '%' instead of vw and vh, and 'rem' for font size, and 'em' for margin. They work well, since they are relative to the font size. I'm not very experienced with front end yet, but those worked well for me :)
2