Friday, December 2, 2016

Overlay Side Navigation Menu

In the last couple of weeks, I've been playing with the side navigation menu. By default, the side navigation menu "pushes" the page content back and forth as it expands and collapses.
Which looks just like this:

By overriding the Universal Theme's CSS related to the side navigation menu, I was able to make the menu display as an overlay.

I've also tested the solution on the Apex 5.1 EA2 and noticed that the html markup of the menu changed quite a bit in order to handle RTL applications.

You can retrieve both CSS here:

Then will need to include the corresponding CSS file either in the theme roller's custom CSS attribute or as an external file in your application's CSS files.

Additionally, by default, the side navigation menu remembers the previous state it was in. So if on a page you expand the menu and refresh it, the menu will be rendered as expanded.

What we can do to prevent that from happening is have some JavaScript code execute on page load that is going to collapse the menu if it's expanded.
$('.t-PageBody.js-navExpanded #t_Button_navControl').click();

That code can be executed as a dynamic action on page 0 or in a global JavaScript file so that it's going to affect all pages in the application.

You will get something that looks like this:

If you would like to have the menu be fullscreen you can simply uncomment the fullscreen part at the end of the CSS file.

You can have a look at my Demo Application


  1. Could you please explain in detail how to do it?

    1. Hello Mahmoud
      I just replied to you on the forum.

    2. Max,
      Could you help me in this new thread

  2. Thanks Max for your contribution. How to apply the grey overlay on the background if the side navigation is expanded.

    Please see the following thread

  3. Maxime,

    Thanks again, here is another thread concerned with Swipe effect


  4. Hey Maxime, thanks for this.
    I am currently on APEX 5.1, so do I have to just include the files: overlay-sidemenu-apex51.css and overlay-sidemenu-apex51-prefixed.css?
    Also is there a way to customize the side menu to make it a bit bigger and have tabs/search etc..