I just wanted a button to change some colors. For example I have the background in "wrap" div and some borders in other divs.
#wrap {
width:100vw;
height: 100vh;
margin:0 auto;
font: italic bold 15px arial, sans-serif;
background-color: rgb(0, 14, 51);
overflow-y: scroll;
background-size: cover;
}
#middleBarExtra{
margin-top: 130px;
height: 1px;
width:100%;
border: solid 5px rgb(200, 64, 235);
border-radius: 30px;
}
How can I change the background color in "wrap" and the border color in "midlleBarExtra", with a function in javascript?
I tried this, but didn't work:
function changeColors(){
document.getElementById("wrap").style.background = "white";
}