So my code looks like this:
<div id="blackbox">style="background: black;
width: 90px;
height: 80px;
color: white;
text-align: center;
font-family: Times;
font-size: 20px;
position: fixed;
left: 0px;
bottom: 150px
Now it somehow doesn't work at the inline CSS, this is the only thing I can get it done. If you got a solution for that, I'd be greatful. But so, I want to make the :hover property but how because this won't work:
<div style="background: black;
width: 90px;
height: 80px;
color: white;
text-align: center;
font-family: Times;
font-size: 20px;
position: fixed;
left: 0px;
bottom: 150px}
blackbox:hover {background: white;}
or
:hover {background: white;}
or
hover {background: white;}
You can't have pseudo selectors within inline styles.
You'll need to use CSS in an external stylesheet (<link rel="stylesheet" href="style.css" />
) or use a <style>
element.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With