Design comparison
Solution retrospective
This is my first landing page I finished without abandoning it to the next, what gave me issue was making it responsive on mobile screen but thanks to a friend who came to my rescue, I'm also having issue understanding the different between Media, media screen and media only means I would so love if you can explain to me in a lame man words.
Your constructive criticism would be much appreciated.
Community feedback
- @grace-snowPosted over 2 years ago
First html you need to
- use a landmark element like main to wrap main content
- Give the logo alt - it's the most important content on the page and you've treated it as a decorative image
- Remove cursor pointer from the logo or wrap it in an interactive element. Pointer signals interactivity
- use an anchor tag for register not a button - they have distinct purposes
- Wrap the social icons in labelled anchor tags. Users would expect to interact with those socials
Marked as helpful0@grace-snowPosted over 2 years agoNext the css…
It’s harder to debug as I’m on my phone today so can’t inspect
But it looks like you are using a lot of percentage widths and large margins to create your layout. None of that should be necessary.
And if using flex basis, you should also be using flex grow/shrink so the browser knows what to do.
Nothing in this except the social icons should have an explicit size. Instead try to use things like max-width when you are tempted to add widths in px
On your next project make sure you work mobile first as is accepted best practice. Your code will be more performant, maintainable and shorter that way. But as you’ve already worked desktop first I wouldn’t bother changing this now. You are starting your media query at the wrong point though!
Only make the switch at the point where there is no longer room for the desktop layout. I recommend having devtools open at the side and using that in combination with zoom in/out to test responsiveness as you work. As you shrink the viewport down you will see a point where the layout no longer works - that’s where you start the media query
I hope this helps
Marked as helpful0 - @correlucasPosted over 2 years ago
Hello Busoalmi, congratulations for you solution!
I saw that you used margin-left to align the icons, but this property make the social links behave like a column when you stretch the page. I applied to your code flex inside the .socia-link class and it have a better behavior. You can try that to see if works better. Code bellow:
.social-link { display: flex; justify-content: flex-end; }
To fix the accessibility issues you need only to apply on <main> tag to wrap all content, if you wrap it just with a div will be less semantic. Try to used more tags like sections, articles, main, to separate semantically your html hierarchy.
I hope it helps you!
Marked as helpful0
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