0

I am having difficulties achieving this with CSS techniques. Maybe I am missing something, but I thought to ask here before I look into Jquery options.

.glyphicon:hover {
        color: rgba(255, 255, 255, 0.60);
}

works to change the glyphicon color on hover.

.h2footer a:hover {
        color: white;
}

Works to change the text element color below it on hover.

But I am trying to achieve to whereas if you hover over the glyphicon the color of the glyphicon AND the text below it both change color.

Meaning, per the example below, if you hover over the forms glyphicon, that changes color, but so does the text below it that says 'Forms'.

https://jsfiddle.net/534gynwv/

bbruman
  • 667
  • 4
  • 20
  • 2
    This link may help: http://stackoverflow.com/questions/4502633/how-to-affect-other-elements-when-a-div-is-hovered – sbswim May 06 '16 at 22:28

1 Answers1

2

Why not:

<div class="col-md-4 double-highlight">
    <a href="#"><i class="glyphicon glyphicon-calendar marketing"></i></a>
    <h2 class="h2footer"><a href="#">Schedule an<br> Appointment</a></h2>
    <p></p>
</div>

And:

.double-highlight:hover .glyphicon, .double-highlight:hover .h2footer a{ color:white; }
jbrya029
  • 492
  • 3
  • 11