Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

div hover background-color change?

Tags:

html

css

hover

How can I make it act as if a line of div is anchor so when I hover on it it returns to red

CSS

.e {     width:90px;     border-right:1px solid #222;     text-align:center;     float:left;     padding-left:2px;     cursor:pointer;   } .f .e {     background-color:#F9EDBE;  } 

HTML

<div>     <div class="e" >Company</div>     <div class="e">Target</div>     <div class="e" style="border-right:0px;">Person</div> </div>          <div class="f">     <div class="e">Company</div>     <div class="e">Target</div>     <div class="e" style="border-right:0px;">Person</div> </div>    <div>     <div class="e">Company</div>     <div class="e">Targetaaa</div>     <div class="e" style="border-right:0px;">Person</div> </div>             <div class="f">      <div class="e">Company</div>     <div class="e">Target</div>     <div class="e" style="border-right:0px;">Person</div> </div>   
like image 654
Codette Avatar asked Feb 13 '12 19:02

Codette


People also ask

How do you change color when hovering?

To change the color of your link on hover, use the :hover pseudo property on the link's class and give it a different color.

Can hover be applied on div?

You can apply :hover styles to any renderable element on a page. IE6 only supports that pseudo-class on links though.


1 Answers

.e:hover{    background-color:#FF0000; } 
like image 84
mgraph Avatar answered Sep 23 '22 12:09

mgraph