html - hover effect is not working with hr tag -
hey guys trying make page having 6 buttons. want caption under image slide in on mouse on event.i using animate.css this.
my problem when use <hr> tag hover effect not working. if removed working want use both together.
i tried <div> tag , border-top property of css element whichever used in-between caption , image cause stop working hover effect.
i tried change size of image , increasing padding not working. there idea how it?
this html code:
<div class="btn-row"> <a href="domainsearch.html"> <div class="box-btn"> <img src="style/img/university.jpg" class="img"><hr class="caption-border"> <div class="caption animated slideinup"> institution</div> </div> </a> </div>
this css:
.caption{ display: none; text-align: center; font-size: 1.5em; color: $txt-lightgrey; position: absolute; margin: -10px 0px 0px -75px; } .img:hover + .caption{ display: inline; }
here example
can me out?
thanks in advance!!
there no .caption
directly after .img
.
use ~
instead of +
.
.img:hover ~ .caption { display: inline; }
Comments
Post a Comment