@lavil014
Posted
Hi Stephanie, try adding 2 button tags in HTML and use the visibility hidden and visible property in CSS to have 2 button tags with different background color. You can use position absolute and relative to place one button over the other and make a button visible when the event listener in JS is triggered.
Hope this is helpful and you can understand this. I will add the event listener function in my JS file:
const displayMedia = ()=>{
let width = window.innerWidth;
if (width<375){
profileInformation.style.visibility = 'hidden';
socialMedia.style.visibility = 'visible';
closeBtn.style.backgroundColor = ' hsl(212, 23%, 69%)';
} else if( width > 376){
profileInformation.style.visibility = 'visible';
socialMedia.style.visibility = 'visible';
closeBtn.style.backgroundColor = ' hsl(210, 46%, 95%)'
}
}