What I'd like to do is apply the random colour to just one div (specifically a div called "content"), so that the document itsself can have the same colour as the border. The reason is that on cell phone displays when you attempt to scroll beyond the limits of the page, the underlying colour "bleeds" behind the black border.
I didn't write the Javascript, but borrowed it from elsewhere, so don't know how to apply it to a single div rather than the whole document.
I would appreciate any help!
QUOTE
<script>
const COLORS = [
'#eefed1',
'#fefcd1',
'#fed5dc',
];
window.onload = () => {
document.body.style.backgroundColor
= COLORS[Math.floor(Math.random() * COLORS.length)];
};
</script>
const COLORS = [
'#eefed1',
'#fefcd1',
'#fed5dc',
];
window.onload = () => {
document.body.style.backgroundColor
= COLORS[Math.floor(Math.random() * COLORS.length)];
};
</script>