Skip to content

Commit c61f8a2

Browse files
authored
kb(grid): Fix percent example and polish explanation (#2679)
* kb(grid): Fix percent example and polish explanation * Update knowledge-base/grid-adjust-height-with-browser.md
1 parent b90431b commit c61f8a2

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

knowledge-base/grid-adjust-height-with-browser.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,19 @@ The following sections demonstrate different ways to make a Grid resize vertical
6060

6161
Use percentage heights to define dimensions as a portion of the parent element.
6262

63-
When setting a `height` in percent, keep in mind the following rule: an element with a percentage `height` requires its parent to have an explicit height. The rule applies recursively until a fixed height is reached, or until the `<html>` element is reached.
63+
When setting a `height` in percent, keep in mind the following rule: an element with a percentage `height` requires its parent to have an explicit height in any absolute or relative CSS unit. The rule applies recursively until a fixed (absolute) height is reached, or until the `<html>` element is reached.
6464

6565
>caption Set Grid Height in percent
6666
6767
````RAZOR
6868
<style>
69-
html, body {
69+
html,
70+
body,
71+
/* Take into account any other app-specific containers
72+
that are in the layout file or App.razor */
73+
div.main,
74+
div.main > div.content
75+
{
7076
height: 100%;
7177
margin: 0;
7278
}
@@ -75,9 +81,9 @@ When setting a `height` in percent, keep in mind the following rule: an element
7581
<div style="height:100%">
7682
<div style="height:100%">
7783
<TelerikGrid Data="@GridData"
78-
Pageable="true"
79-
PageSize="50"
80-
Height="100%">
84+
Pageable="true"
85+
PageSize="50"
86+
Height="100%">
8187
<GridColumns>
8288
<GridColumn Field="@nameof(SampleModel.Name)" />
8389
</GridColumns>

0 commit comments

Comments
 (0)