I am developing a small website and I have to face some problems.
I want to resize a div in a row with a certain height in percent. I was already looking for SO, but nothing was good for me. Here is my code:
<body> <nav class="navbar navbar-inverse navbar-static-top"> ... </nav> <div class="container-fluid"> <div class="row row-first"> <img class="img img-responsive" src="public/img/bg.jpg" /> </div> </div>
the row-first class does not currently have rules, so it does not take effect. I want the "div-first" div to be 80% of the height of the viewport, but the only way to resize it is to place the content inside the div so that the height of the div matches the height of the content. my CSS:
html { height: 100%; } body { height: 100%; } body { font-family: 'Muli', sans-serif; } .container-fluid { max-height: 100%; padding-left: 0px; padding-right: 0px; } .row { margin-left: 0px; margin-right: 0px; height:80%; } .row-first { }
source share