I have something like that
<div id="hover_parent">
<h3>Something</h3>
<h3>Something else</h3>
</div>
that looks something like that
#hover_parent{
background-image:url(animage.jpg) no-repeat;
background-position:bottom left;
background-size:cover;
width:100%;
}
h3{
margin-top:20px;
width:50%;
text-align:center;
transition:0.2s;
}
h3:hover{
margin-top:0px;
}
So what I want to achieve, is that the child-elements move a bit up when hovering them. What they do of course by using a smaller margin-top-amount when hovering.
But my problem then is that the whole parent moves (especially the background-image) up too when hovering a child-element.
How could I prevent that?
None of my child-elements do have a real absolute height, so I didn't come along with min-height and calc but that could do it - nor?