Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted 11 months ago

Article Preview Component

P
rmmcfarlin•240
@rmmcfarlin
A solution to the Article preview component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What challenges did you encounter, and how did you overcome them?

I spent a long time trying to figure out how to get the share button to stay visible when the share links / icons element was visible. I completely re-structured it with a separate bottom section element for mobile, three separate button elements, and other tedious workarounds that still didn't work. i finally found someone mentioning z-index, applied z-index: 1 to my button element, and that instantly fixed it. Glad to have finally figured it out, wasted a lot of time missing that simple solution!

I also realized my script wasn't running on first click, but finally read that the style attribute looked for inline styles in the HTML element, while I had it in the stylesheet. By adding the style inline, solved this issue as well, but there may be a better way to fix this.

What specific areas of your project would you like help with?

Any general feedback appreciated!

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on rmmcfarlin's solution.

Join 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

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner
  • Use cases

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License