Design comparison
Solution retrospective
I am proud of trying one more time every time I faced a challenge.
- The JavaScript was really simple, but this is the first time I had to think on my feet with no guidance since I learned JavaScript.
- I am proud of the structure of the HTML that made it possible for me to work with two sections that are practically one but they alternate in display, but in desktop size, one is permanently visible while the other switches state from being an element in flow display to a 'floating' element that doesn't take up any space with the main content.
- I am also proud of he little pop-up animation, considering how tiny it is.
I struggled with the positioning of the 'share menu' in desktop size. The approach I took was to position it absolutely relative to its parent which is the '.bottom' section element and try to match it up with the '.share-button' button element which is, too, positioned absolutely relative to the '.bottom' element. However, my approach was very explicit and did not work well when resizing the window.
A thought I had was to, in some way or another, position it relative to the button considering they're on the same level in the DOM tree, but I couldn't quite figure it out.
Community feedback
- @Vanillatte68Posted 5 months ago
Good job on completing the challenge!
I think your positioning is good enough in desktop size, you only need to adjust the
right
CSS property more.I noticed the 'hidden' class for publisher toggle incorrectly when you open the share menu in desktop and then resize it to below 768px. You can adjust the event listener to toggle 'hidden' class for publisher when share menu is open and being resize.
I hope this will help. Happy coding
Marked as helpful1@MaanAlHababiPosted 5 months ago@Vanillatte68
The problem with adjusting the right property is that I can make it look fine on only one screen size, if I resize the window even slightly it gets messed up. There is a major difference between 1440px width and 1920px for example, I can only make it work for one which makes me believe that my method isn't optimal.
About the publisher section, I completely overlooked it! Thank you for pointing it out!
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