@dreaquil
Submitted
I'm unsure how best to get the sizing of the image and the component right.
I'm unsure how to deal with responsiveness at the lower end of mobile.
@brandonetter
@dreaquil
Submitted
I'm unsure how best to get the sizing of the image and the component right.
I'm unsure how to deal with responsiveness at the lower end of mobile.
@brandonetter
Posted
Hey! Centering and sizing things can be hard. You can try using percentages and non-absolute values for sizing to help with responsiveness- and there's always @media queries in CSS!
https://codepen.io/brandonetter/pen/wvjZMeb
You can also add centering to your body to keep everything in the middle. Good work.
Marked as helpful
@Saubhagya111
Submitted
How do I make the class of "unread" being removed when I click on "mark all as read" I tried various ways but it didn't work and how to add the red dot at the end of unread notifications ?
@brandonetter
Posted
Hi! My solution would be to add an event listener to "mark all as read" and have that run a function that toggles the class "read" on each element.
https://codepen.io/brandonetter/pen/oNdVmZR?editors=1111
Here's a quick example. We use document.querySelector to grab the elements and then place listeners on them. We can access the classList and use the toggle() function to add/remove a class.