I want the text in the .jumbotron
div to be pushed down half way between the div, instead of hovering towards the top. I am opting to use padding-top: 50%
. Instead, it's centering halfway down the entire page, not halfway down the div. http://jsfiddle.net/Lvegtyvo/
The height of the div is determined by the viewport size, so it is not a definite number. I set the height in #jumbotron-header
to be inherited from the parent .jumbotron
, but it's ignoring the inherited height and still centering 50% down the entire page.
Does anyone have any idea why the height is not being inherited? Does it have to do with using vh as the height instead of a solid number?
HTML
<div class="jumbotron text-center img-responsive" id="jumbotron">
<div id="jumbotron-header">
<h1>test</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmo</p>
</div>
</div>
CSS
.jumbotron {
background: url(images/jumbo.png) no-repeat center;
background-size: cover;
min-width: 100%;
min-height: 100vh;
margin-bottom: 0 !important;
}
#jumbotron-header{
height: inherit;
padding-top: 50%;
}