Responsive Landing Page Using Media Queries and Flex Box

Solution retrospective
Is there a better way to organize my CSS file? If you have any other feedback please do share.
Please log in to post a comment
Log in with GitHubCommunity feedback
- @pikapikamart
Hey, awesome work on this one. The desktop layout looks great, though it would be really nice to have a bit more padding in general since the content right now are too spaced out compared to the design. When resizing the layout, there are issues since the layout gets too squashed. Try going into like 530px on your screen, you will see that the content are squished and the layout in the footer is destroyed. Though the mobile state looks fine.
For some other suggestions, here are some:
- Adding a
max-width
on thebody
along withmargin: 0 auto
. If you zoom out on your screen, you will see that the contents are going out of places and just occupy the full width. Adding themax-width
will help the site's content layout to be placed properly and be controlled. - The
header
andfooter
should be living outside themain
tag so that it will be treated as primary landmark element properly.
<header /> <main /> <footer />
- The primary
header
should only be containing the topmost part of the site where it includes the site-logo, site-links and other controls if there are. The hero-section should be left for themain
tag. The reason is that, we want theheader
to be as reusable so that we could used it on other pages of our site. By including the hero-section in theheader
then we won't be able to reuse it now because we don't want the hero-section to appear on the pages again right. - When using
img
tag, you don't need to add words that relates to "graphic" such as "logo, illustration" and others, sinceimg
is already an image so no need to describe it as one. - If you somehow look again on the images that are used on this site, almost all images except for the site-logo doesn't really give any information at all, meaning these images only serves as decoration on the site. Decorative images should be hidden for screen-reader at all times by using
alt=""
andaria-hidden="true"
to theimg
tag or onlyaria-hidden="true"
if you are usingsvg
instead ofimg
tag. - Only use descriptive
alt
on images that are meaningful and adds content to the site otherwise hide the image for screen-reader users.
FOOTER
- Same with the company logo, use a more proper
alt
value. - Those 3 icons on the 3 information below the site-logo should be hidden as well using the method mentioned above.
- Those 6 links on the right side, they could be placed inside the
nav
since those are still your website's navigational links right. Also, since they are all related links, using a singleul
would be really nice:
<nav> <ul> li*6 </ul> </nav>
- Each
a
tag that wraps the social-media icon should have eitheraria-label
attribute orsr-only
text inside it, defining where the link would take them. For example, you should usefacebook
as the value if the link would take the user to facebook. - Social-media image should be hidden since it is only a decorative
svg
so usearia-hidden="true"
on it. - Lastly, just addressing the responsiveness issue on the site:>
Aside from those, great job again on this one.
Marked as helpful - Adding a
Join 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