I can't find an ideal solution for positioning a child element to the bottom right of its parent.
https://jsfiddle.net/oq4hycdt/1/
HTML
#border {
border: 5px solid #101010;
background-color: white;
position: relative;
margin: auto;
width: 700px;
padding: 0px 15px 0px 15px;
}
.block {
position: relative;
border: 1px solid black;
border-style: none none solid none;
padding: 0px 0px 10px 0px;
overflow-x: hidden;
overflow-y: auto;
}
.stuff {
border: 2px solid black;
position: relative;
margin: 0% 0% 0% 0%;
float: right;
right: 10px;
bottom: 0;
line-height: 0;
}
form {
margin: 0% 0% 5px 0%;
border: 2px solid black;
float: left;
}
<div id="border">
<div class="block">
<h3>header1</h3>
<form>
<input name="A" type="radio">1<br>
<input name="A" type="radio">2<br>
<input name="A" type="radio">3
</form>
<div class="stuff">
<h4>stuff</h4>
<input type="range" min="0" max="100" value="50">
<input type="checkbox">Check
</div>
</div>
<div class="block">
<h3>header2</h3>
<form>
<input name="B" type="radio">1<br>
<input name="B" type="radio">2<br>
<input name="B" type="radio">3<br>
<input name="B" type="radio">4<br>
<input name="B" type="radio">5
</form>
<div class="stuff">
<h4>stuff</h4>
<input type="range" min="0" max="100" value="50">
<input type="checkbox">Check
</div>
</div>
<div class="block">
<h3>header3</h3>
<form>
<input name="C" type="radio">this is a really really really really really really really really really really really long line
</form>
<div class="stuff">
<h4>stuff</h4>
<input type="range" min="0" max="100" value="50">
<input type="checkbox">Check
</div>
</div>
</div>
I'm trying to get the stuff class element to move to the bottom right of its parent block element and to expand the parent elements height if there is no room. If i use absolute positioning for the stuff class there is overlay between the text of the radio input and the content of the stuff element. If i use relative positioning then the stuff element doesn't seem to obey the bottom property.