Design comparison
Solution retrospective
I had trouble setting both the hamburger menu and "sunnyside" title on the same place, but on opposite ends. (this is for the mobile version)
Community feedback
- @nottohavePosted over 2 years ago
Hello @nyrellcl, for mobile view, I hope this helps you out with your trouble. Using flex is easier. I just use display flex and justify content: start / end to position the items. Let me know if this helps:
HTML Structure <div class="ham-container"> <a class="sunny> <div id="ham-icon"> /* For Mobile */ CSS .ham-container { width: 100%; padding: 1rem 0 0 1rem; display: flex; justify-content: space-between; } .sunny { display: flex; /* I keep the rest of your code the same as github */ } #ham-icon { display: flex; justify-content: flex-end; flex-direction: column; margin-right: 1rem; } /* For desktop CSS media query */ .sunny { width: 100%; } .ham-container { display: none; }
Marked as helpful1@nyrellclPosted over 2 years agoOhh my goodness, this helped so much. I overthought the whole thing lol You're right, I should've just used flex. I added bits of your code suggestions to my current code which helped a ton and actually got the result that i was aiming for. I commented out your code in my file just for reference. i appreciate it! I hope to help you the same way you did me for your future/current projects! @nottohave
1@nottohavePosted over 2 years ago@nyrellcl hey I glad that helped and thanks for the reference. You can help others to up your scores at the moment. If you want to collaborate, I suggest join the Slack community.
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