# Dynamic ion-side-menu width?

**URL:** <https://forum.ionicframework.com/t/dynamic-ion-side-menu-width/27206>\
**Category:** ionic-v1\
**Created:** [June 26, 2015, 9:04am UTC](https://forum.ionicframework.com/t/dynamic-ion-side-menu-width/27206 "2015-06-26T09:04:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![PedlarCo](https://avatars.discourse-cdn.com/v4/letter/p/34f0e0/32.png) [@PedlarCo](https://forum.ionicframework.com/u/PedlarCo)\
**Post date:** [June 26, 2015, 9:04am UTC](https://forum.ionicframework.com/t/dynamic-ion-side-menu-width/27206/1 "2015-06-26T09:04:32Z")

</div>

Hi,

Just getting started with Ionic/Angular so apologies if this is a silly question.

I’m trying to get an `ion-side-menu` that changes size depending on the user’s screen resolution.

I’ve got something like this:

```
<ion-side-menu side="left" width="{{width}}">

```

Which works fine on the initial page load.

The trouble is if the user resizes the screen (or, more to the point, rotates their device to landscape)

I have this code to watch the resize event and update the width:

```
$scope.$watch(function(){
   return $window.innerWidth;
}, function(value) {
    $scope.width = value * 0.4;
});

```

But this doesn’t seem to work - when the side menu is toggled it only comes out to the width it had when the page first loaded - not the new width caused by the user switching to landscape.

I’m guessing the width is stored somewhere on first load and not subsequently updated.

Anyone have any ideas how I could get this to work?

Many thanks!

---

<div class="post-metadata">

**Author:** ![chris08002](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/chris08002/32/91975_2.png) [@chris08002](https://forum.ionicframework.com/u/chris08002)\
**Post date:** [September 1, 2015, 12:58pm UTC](https://forum.ionicframework.com/t/dynamic-ion-side-menu-width/27206/2 "2015-09-01T12:58:50Z")

</div>

Did you find any solution for this?

---

<div class="post-metadata">

**Author:** ![isilva](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/isilva/32/92030_2.png) [@isilva](https://forum.ionicframework.com/u/isilva)\
**Post date:** [December 10, 2015, 2:05pm UTC](https://forum.ionicframework.com/t/dynamic-ion-side-menu-width/27206/3 "2015-12-10T14:05:34Z")

</div>

> [@PedlarCo](#):
>
> watch

How did you solved it?

---

<div class="post-metadata">

**Author:** ![raju6567](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/raju6567/32/113022_2.png) [@raju6567](https://forum.ionicframework.com/u/raju6567)\
**Post date:** [December 15, 2017, 12:02pm UTC](https://forum.ionicframework.com/t/dynamic-ion-side-menu-width/27206/4 "2017-12-15T12:02:14Z")

</div>

@PedlarCo Did you find any solution for this?

---

<div class="post-metadata">

**Author:** ![akr\_rajkumar](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/akr_rajkumar/32/116194_2.png) [@akr\_rajkumar](https://forum.ionicframework.com/u/akr_rajkumar)\
**Post date:** [December 15, 2017, 12:23pm UTC](https://forum.ionicframework.com/t/dynamic-ion-side-menu-width/27206/5 "2017-12-15T12:23:05Z")

</div>

In your scss file,

```
ion-menu[side=left] .menu-inner {
    width: 70%;
}

```

use this.

---

<div class="post-metadata">

**Author:** ![raju6567](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/raju6567/32/113022_2.png) [@raju6567](https://forum.ionicframework.com/u/raju6567)\
**Post date:** [December 15, 2017, 1:43pm UTC](https://forum.ionicframework.com/t/dynamic-ion-side-menu-width/27206/6 "2017-12-15T13:43:38Z")

</div>

@akr_rajkumar I want to change width of left menu when clicking on button which fires a click event and change the width respective to the width variable. For this issue, I have created question [Ionic left menu slider width not updated when width variable increase in js](https://forum.ionicframework.com/t/ionic-left-menu-slider-width-not-updated-when-width-variable-increase-in-js/115490)
