activating background overlay with link

0
Is everything good? I'm preparing a layout for a blog and need to do a slidershow or so in the following way:

NowIcandoeverythingbeautyviaCSS,butIhaveaproblem!Theimaginaonlyactivateswhenthemousepassesoverthediv,butIneedtheimagetobeactivatedorbettertobecoloredwhenhoveringthemouseintheimagelink.

Couldsomeonegivemethishelp?

FollowmycodeviaBOOTPLY

BOOTPLY

I do not know if it has to do this via CSS or if it is done only via Javascript, I even tried to do via javascript but I do not understand much about JS.

    
asked by anonymous 21.07.2015 / 19:31

2 answers

1

To activate only in LINK will require a big change, so to avoid having to redo all the code it is activating when placing on top of the <div class="over-text-feature"> that contains the text.

I put <div class="img-box-feature"> after <div class="over-text-feature"> so you can access with .over-text-feature:hover + div.img-box-feature use the operado + (Adjacent Sibling Selector) " in css causes you to select the adjacent sibling of the element based on its parent.

In this specific case, it selects the next div.img-box-feature that is part of the same parent as <div class="over-text-feature"> .

Follow the example in Bootply

    
21.07.2015 / 21:58
0

Just insert the% div_with% of div over-text-feature making it your daughter, like this:

<div class="col-md-6 box-um">
  <div class="img-box-feature" style="background-image:url('http://lounge.obviousmag.org/a_boleia_da_ideia/2012/08/gatimonias-ou-maldita-curiosidade.html.jpg?v=20150627141437')">
    <div class="over-text-feature">
      <h1><a href="#">Lorem Ipsum é simplesmente uma simulação de texto da indústria tipográfica e de impressos</a></h1>
      <p>Lorem Ipsum é simplesmente uma simulação de texto da indústria tipográfica e de impressos</p>
    </div>
  </div>
</div>
    
21.07.2015 / 21:26