# Ionic side menu width in percentage

**URL:** <https://forum.ionicframework.com/t/ionic-side-menu-width-in-percentage/29607>\
**Category:** ionic-v1\
**Created:** [July 30, 2015, 7:14pm UTC](https://forum.ionicframework.com/t/ionic-side-menu-width-in-percentage/29607 "2015-07-30T19:14:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![shrey](https://avatars.discourse-cdn.com/v4/letter/s/b5a626/32.png) [@shrey](https://forum.ionicframework.com/u/shrey)\
**Post date:** [July 30, 2015, 7:14pm UTC](https://forum.ionicframework.com/t/ionic-side-menu-width-in-percentage/29607/1 "2015-07-30T19:14:41Z")

</div>

how to make side menu to width to be 80% of screen width?

---

<div class="post-metadata">

**Author:** ![RaghavendraKumar](https://avatars.discourse-cdn.com/v4/letter/r/dbc845/32.png) [@RaghavendraKumar](https://forum.ionicframework.com/u/RaghavendraKumar)\
**Post date:** [August 7, 2015, 4:13am UTC](https://forum.ionicframework.com/t/ionic-side-menu-width-in-percentage/29607/2 "2015-08-07T04:13:37Z")

</div>

I would also love to hear an answer on this - any help !!!

---

<div class="post-metadata">

**Author:** ![pliablepixels](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/pliablepixels/32/112372_2.png) [@pliablepixels](https://forum.ionicframework.com/u/pliablepixels)\
**Post date:** [August 7, 2015, 5:03am UTC](https://forum.ionicframework.com/t/ionic-side-menu-width-in-percentage/29607/3 "2015-08-07T05:03:14Z")

</div>

ion-side-menu has a “width” attribute which you can set to `{{0.8 * devWidth}}` where

```auto
$rootScope.devWidth = ((window.innerWidth > 0) ? window.innerWidth : screen.width);

```

The problem however is once set, it is not possible to change is as far as I can tell, so in future if you flip your phone from landscape to portrait and you trap the "resize " event in the hope that you recompute devWidth and have the side menu automatically take up 80% of that new value, it does not seem to work.

I’ve even tried getting a handle to the ion-side-menu element on “resize” and tried to do element.attr(), element.style.width and others but it made no difference

---

<div class="post-metadata">

**Author:** ![shrey](https://avatars.discourse-cdn.com/v4/letter/s/b5a626/32.png) [@shrey](https://forum.ionicframework.com/u/shrey)\
**Post date:** [August 18, 2015, 1:41pm UTC](https://forum.ionicframework.com/t/ionic-side-menu-width-in-percentage/29607/4 "2015-08-18T13:41:08Z")

</div>

Thanks It works for me, there is no question of orientation changed, because my app is portrait only
