Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Weak Attempt of Responsivity and JS

NBD 240

@bdal90

Desktop design screenshot for the Article preview component coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Hey All,

Here is my next experimentation and honestly I am not very satisfied with the result. The task was more difficult than I expected it to be, here are my main problems and questions:

  1. I used absolute positioning for the social media share pop-up and a separte one for the caret down. Any suggestions on how could I have done it better?

  2. In JavaScript, I applied a click event on the css selector named "hidden", which includes both social media box and the caret down, but somehow the caret down doesn't appear when clicked on the icon. Why is that?

  3. I was suffering with making it responsive and I think the result is just terrible. Any tips on how to be more precise and effective?

Thanks a lot for checking it out,

Wishing you all great practice,

Dalma

Community feedback

@matiasluduena23

Posted

Hi @bdal90, Nice work! Just one advice.

  • You can add a class call active to open and close the social icons. In your css file use .social-media {display: none} and add the class .social-media.active{ display: block} to show the icons. And with javascript add the class with the toggle propperty
const shareBtnEl = document.querySelector('.share')
const socialMediaEl = document.querySelector('.social-media')

shareBtnEl.addEventListener('click', () => {
    socialMediaEl.classList.toggle('active')
})

your social will open and close on click. This video could help you with JS link

If you want a good course for responsive layout do this It help me. Good code

Good code!

Marked as helpful

0

NBD 240

@bdal90

Posted

Many many thanks @matiasluduena23!

0

Please log in to post a comment

Log in with GitHub
Discord logo

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