)
We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Essential JS2

Syncfusion jQuery based widgets are no longer in active development. Switch to our pure JavaScript based next generation Essential JS 2 library.

Syncfusion Feedback

How to handle the height of the navigation drawer?

Platform: jQuery |
Control: ejNavigationDrawer |
Published Date: March 5, 2015 |
Last Revised Date: May 10, 2019

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.

HTML

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

  <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'

                     data-ej-text="Alerts">

                </div>

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

                     data-ej-text="Camera">

                </div>

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

                     data-ej-text="Games">

                </div>

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

                     data-ej-text="Map">

                </div>

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

                     data-ej-text="Messages">

                </div>

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

                     data-ej-text="Music">

                </div>

            </div>

        </div>

    </div>

CSS

<style>

        .navwrapper {

            display: block;

            height: 325px;

            position: relative;

        }

    </style>

The following screenshot displays the output.

Navigation drawer

ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon