To centrally align the inline div, you can utilize text-align:center
, followed by absolute or fixed positioning for the inner div with a relative position on the outer div to anchor it at the bottom:
#outer {
border: 1px solid black;
height: 500px;
text-align:center;
position:relative;
}
#inner {
border: 1px solid black;
display: inline;
margin: 0 auto;
position:absolute;
bottom:0
}
<div id = 'outer'>
<div id = 'inner'> inner </div>
</div>
MODIFY
You could enclose the content within another element and apply margin:0 auto on an inline or inline-block style:
#outer {
border: 1px solid black;
height: 500px;
text-align:center;
position:relative;
}
#inner {
width:100%;
position:absolute;
bottom: 0;
}
#innerContent{
border: 1px solid black;
display:inline-block;
margin:0 auto;
}
<div id = 'outer'>
<div id = 'inner'>
<div id='innerContent'>hesisaveylongstringloremipsum<br>
<input type='submit'>
</div>
</div>
</div>