The height of the ng grid in%. 100% parent container

In an ng grid, I need to set the height to 100% so that it is always the height of the parent container (another div wrapping the div grid) even when the window is resized. How should I do it? {height : 100%}doesn't allow it?

+4
source share
3 answers

https://github.com/angular-ui/ng-grid/issues/80

At the very end, the savior added an answer. 100% height allowed with latest versions. Also after that, for me the heading remains constant

0
source

This is what worked for me.

.ui-grid {
  position: absolute;
  height: auto;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

- , @dcryan22, . , .

, .ui-grid, .

+6

This article answered the use of the CSS viewport. Works great for me!

I added this to CSS:

.ui-grid {
    height: 98vh;
}

I use twitter bootstrap, but don't even need extra divs or containers.

+3
source

Source: https://habr.com/ru/post/1539858/


All Articles