Melissa
Melissa

Reputation: 787

How to change color when hover over div id?

I have made a div id in my html and draw the bars in my css. Now i want to change the colors when hover over the bars.

here is a example of my html

<div id="balklongwaarde">
</div>

And here is my css where I draw the divs

#balklongwaarde{
height: 150px;
width: 40px;
border: 1px solid #2e9afe;
background: #2e9afe;
position: absolute;
margin-top: 200px;
margin-left: 200px;
}

How to change the background color when hover over the bars?

Upvotes: 0

Views: 9760

Answers (1)

shivam17
shivam17

Reputation: 61

in css

 #balklongwaarde:hover{background-color:red;}

Upvotes: 6

Related Questions