V
V
vasIvas2015-07-28 19:10:09
css
vasIvas, 2015-07-28 19:10:09

How to set grid size in bootstrap?

There are three grids, two of which contain nav-bars stretched across the width and pressed to the top and bottom.
How can I make the box-grid between the nav-bar's fill all the space between them?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Sidorenko, 2015-08-23
@sidorenkoda

If stupidly on the forehead, then this:
CSS
nav-bar should be absolutely positioned, one on top, the other on the bottom
#content { position: absolute; left: 0; top: 0; }
JS
hOfWindow = find out window height, do parseInt [ like parseInt($(window).height()); ]
hOfTopElement = height of top nav-bar, do parseInt
hOfBottomElement = height of bottom nav-bar, do parseInt
Block grid in between => id = #content
$('#content').css('height', hOfWindow - hOfTopElement - hOfBottomElement );
$('#content').css('top', hOfTopElement);
And everything will be in its place)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question