Articles in this section
Category / Section

How to handle the height of the navigation drawer?

1 min read

The height of the navigation drawer can be handled by its parent element. Navigation drawer can be appended either to the page or to its parent. This can be achieved by the position property that takes a value fixed or normal and appends the drawer to the page or to its parent respectively.

Since navigation drawer is a layout control, it is set with the height based on its parent element. By default, the control is rendered with fixed position respective to the page. So, to handle the height of the navigation drawer, create one wrapper div and set the height for the same. After creating the element, render the navigation drawer by setting the position property to normal. Now, the navigation drawer renders with the height of the wrapper element that is set in the wrapper. Refer to the following code example.


<div class="header">
        <div id="header">

  <div class="navwrapper">

        <div data-role="ejnavigationdrawer" data-ej-targetid="header" id="tempnavpane" data-ej-position="normal">

            <!--Place your control here-->

            <div class="defaultsample">

                <div id="Div1" data-role="ejtile" data-ej-tilesize="medium" data-ej-imageurl='themes/images/tileview/alerts.png'



                <div id="Div2" data-role="ejtile" data-ej-tilesize="medium" data-ej-imageurl='themes/images/tileview/camera.png'



                <div id="Div3" data-role="ejtile" data-ej-tilesize="medium" data-ej-imageurl='themes/images/tileview/games.png'



                <div id="Div4" data-role="ejtile" data-ej-tilesize="medium" data-ej-imageurl='themes/images/tileview/map.png'



                <div id="Div5" data-role="ejtile" data-ej-tilesize="medium" data-ej-imageurl='themes/images/tileview/messages.png'



                <div id="Div6" data-role="ejtile" data-ej-tilesize="medium" data-ej-imageurl='themes/images/tileview/music.png'








        .navwrapper {

            display: block;

            height: 325px;

            position: relative;



The following screenshot displays the output.

Navigation drawer

Did you find this information helpful?
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment