Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change span color on div hover

Sorry if this is stupid question but i really don't know what problem is.I am trying to change color of span on div's hover but my code doesn't seems to work.
Here is code i'am using:

HTML

<div class="slike_i_text">


    <a href="#"><div>
    <img align="left" src="wolf.jpg"/><span>Text 1</span></div></a>

    <a href="#"><div>
    <img align="left" src="wolf.jpg"/><span>Text 2</span></div></a>



</div>

CSS

.slike_i_text div{
    overflow: hidden;
    width:300px;
    margin-bottom: 10px;
    text-decoration: none;
}
.slike_i_text div img{
    width:80px;
    height:80px;
}
.slike_i_text div span{
    color: #6A6A6A;
font-family: arial;
font-size: 15px;
font-weight: bold;
}
.slike_i_text a{
    text-decoration: none;
}
.slike_i_text div:hover  .slike_i_text div span{
    color:lightgreen;

}

You can find my fiddle here.

like image 881
Crion Avatar asked May 25 '14 19:05

Crion


1 Answers

You may try this (Updated Fiddle Example):

.slike_i_text div:hover span{
    color:lightgreen;
}

Instead of this:

.slike_i_text div:hover  .slike_i_text div span{
    color:lightgreen;
}
like image 135
The Alpha Avatar answered Sep 30 '22 06:09

The Alpha