I am learning CSS and was trying to figure out a way to make the background color of the body change as you hover over the header element on the page. I have tried to use every selector and it just doesn't work! Can anyone help me figure out my problem? Here is my code:
<html>
<style>
#header {
text-align: center;
position: relative;
}
#header:hover ~ .body{
background-color: blue;
}
.body{
background-color: purple;
}
</style>
<body class="body">
<div id="header">
<font size="16">My Header</font>
</div>
</body>
</html>