I have a div(child) that is mandatory to be absolute positioned in another div(parent).
In the child div I have another div(nephew) and I want his content to be vertical align in the center; (in the example, Resources and the checkbox)
The content inside can variate, so setting top, right as constants is not really an option.
Please no flexbox, because I need to support older browsers.
.wrapper{
position:relative;
height:130px;
background:red;
}
.lp {
color:$white;
position:absolute;
height: 100%;
top: 0;
right: 0;
background: blue;
}
.lp .toggler {
display:inline-block;
vertical-align:middle;
padding: 20px;
}
}
<div class="wrapper">
<div class="lp">
<div class="toggler">
<span> Resources </span>
<input type="checkbox" />
</div>
</div>
</div>