Design comparison
Solution retrospective
How do you align logo to left on the mobile view?
I've tried:
float: left;
text-align: left;
Community feedback
- @A-amonPosted over 3 years ago
Hello! Great work~
I have a few suggestions:
-
Rather than explicitly setting the width for body, you can instead use width:100%. Same goes to .left-part which has same width as its parent .top-container.
-
As for the image, setting width:auto seems to solve your question.
-
Place the .top-container inside or change the div into main tag. Also, put the logo in a header tag. This way, there's clear difference between header, content (main) and footer.
-
Wrap the logo and social media icons in a tag. Clicking on the logo usually redirects to the homepage whereas clicking on social media icons redirects to the respective social media accounts.
Marked as helpful1@1aleksaPosted over 3 years ago@A-amon thanks a ton.
I've done all the points.
Can you please just clarify the the first sentence from 3)? When you say change the div into main tag, do you mean literally renaming the class=main?
I didn't get that part.
Also, why for body width:100%?
0@A-amonPosted over 3 years ago@1aleksa
About point no.3, I meant doing either:
-
Putting .top-container inside a main tag.
-
Use main tag instead of div for .top-container.
About the width:100%, it's because I think it would make it easier to apply the width value for other not too large view sizes too, e.g. tablet (not including large sizes like laptop/desktop). This way, you don't have to explicitly set the width for those not too larger sizes as well.
For e.g. If you explicitly set the width, You would have to set e.g. 365px for mobile size then another, let's say 765px, etc. for other not too large sizes.
It's just my opinion tho~
1@1aleksaPosted over 3 years ago@A-amon Okay, thanks for the detailed explanation.
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