Design comparison
Solution retrospective
My use of JavaScript, having only learnt some of it today with limited experience using it in the past.
What challenges did you encounter, and how did you overcome them?The social pop up (on button press) for desktop was very challenging, especially with the pointer at the bottom of it. I don't think it has been done the best way possible, but it seems to work and I would definitely like to improve it.
What specific areas of your project would you like help with?Improving the way I have positioned the desktop social part (with the pointer) once the button is pressed. Using position: relative
with top
and bottom
doesn't seem the most effective way.
Community feedback
- @tomwinskellPosted 21 days ago
Nice work! You completed the challenge and your solution looks awesome. You also said this is the first time you are using JavaScript which makes the achievement even more impressive.
It's cool how you made the triangle or pointer. I didn't think to do it like that. You can actually make just a triangle using CSS. See the code here and a short article about it:
.preview__footer__share__arrow-down { width: 0; height: 0; border-left: 12px solid transparent; border-right: 12px solid transparent; border-top: 12px solid var(--dark-blue); }
Personally I positioned my share callout using
position: absolute;
. The parent div then has the propertyposition: relative
. Like this:.preview__relative__container { position: relative; } .preview__footer__share { position: absolute; top: 150px; left: 280px; }
What you have done works though so I wouldn't stress about that. However, if you're interested in a good article about positioning elements using absolute or relative I've put a link here. Positioning absolute, relative to parent
The one thing I think would make a big difference to your solution is that the elements jump around on transitions. Functionally it's not a big deal, it's just annoying. I had an issue with this as well. I believe it's happening here because the elements your hiding or showing are different sizes. The solution I found worked was to contain my footer in a div that had a consistent height. The height of the tallest element. That way, when the smallest element was shown and largest hidden, the container remains the same height. You could try re-factoring your code to include this small change, it would make a big difference I'm sure!
I hope this helps, if it does, I'd appreciate if you can mark my comment as helpful!
Good luck with your next project! Tom
Marked as helpful0@marcus-hillPosted 20 days agoHi @tomwinskell - thanks so much for your feedback! I'll look to make the necessary changes to the code.
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