I need to set the height of <div>
based on background image which is contained, could anybody help me how to do that? In the div is some text.
I would live either a help how to achieve that in my code in bootply or any other approach how to achieve that would be also great.
I've found this stackoverflow already, but it didn't worked for my - it's used in bootstrap template used for a Wordpress. Thanks a lot!
Code:
<div class="container-fluid" id="uvod">
<div class="row clearfix uvod silver"><div class="container">
<div class="col-md-12 column">
<div class="text-center"><h2>HEADER 2</h2></div>
<div class="text">Some text goes here.</div>
</div>
</div></div>
</div>
CSS:
.uvod {
background:url('http://disk.kybernaut.cz/header.png') no-repeat top center;
height: 550px;
padding-top: 250px;
background-size: contain;
}