# Ionic v4 popup width adjustment

**URL:** <https://forum.ionicframework.com/t/ionic-v4-popup-width-adjustment/140728>\
**Category:** Ionic Framework\
**Created:** [September 4, 2018, 5:26pm UTC](https://forum.ionicframework.com/t/ionic-v4-popup-width-adjustment/140728 "2018-09-04T17:26:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![doug1e](https://avatars.discourse-cdn.com/v4/letter/d/ea666f/32.png) [@doug1e](https://forum.ionicframework.com/u/doug1e)\
**Post date:** [September 4, 2018, 5:26pm UTC](https://forum.ionicframework.com/t/ionic-v4-popup-width-adjustment/140728/1 "2018-09-04T17:26:46Z")

</div>

Hi everyone,

Could you please help me out on how to set the width of a popup in v4? I had used the below at v3 but they do not seem to work with v4. I am struggling with the new docs a bit but I see these variables in the ionic code for ex at popover.ios.vars.scss

For ex, I placed the below both at global.scss and at variables.scss. What am I doing wrong?

$popover-ios-width: 80%;  
$popover-md-width: 80%;  
$popover-wp-width: 80%;

Thanks,

Doug

---

<div class="post-metadata">

**Author:** ![doug1e](https://avatars.discourse-cdn.com/v4/letter/d/ea666f/32.png) [@doug1e](https://forum.ionicframework.com/u/doug1e)\
**Post date:** [September 6, 2018, 5:56am UTC](https://forum.ionicframework.com/t/ionic-v4-popup-width-adjustment/140728/2 "2018-09-06T05:56:30Z")

</div>

I am not sure if this is the best/right way of doing it but I managed to style with the below. I was hoping the $popover-\*-width would work but I had no success. I hope I am not misleading anyone with the below but thought of sharing my way out…

ion-popover {  
&.popover-ios, &.popover-md {  
div.popover-content {  
top: 50% !important;  
left: 50% !important;  
transform: translate(-50%, -50%) !important;  
width: 90%;  
overflow: initial;  
}  
}  
}

---

<div class="post-metadata">

**Author:** ![reedrichards](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@reedrichards](https://forum.ionicframework.com/u/reedrichards)\
**Post date:** [September 6, 2018, 6:03am UTC](https://forum.ionicframework.com/t/ionic-v4-popup-width-adjustment/140728/3 "2018-09-06T06:03:29Z")

</div>

Yep I think too that using `!important` was unfortunately the way, but it works 😉

I opened an Nice To Have feature request on Github about that [https://github.com/ionic-team/ionic/issues/15036](https://github.com/ionic-team/ionic/issues/15036)

---

<div class="post-metadata">

**Author:** ![doug1e](https://avatars.discourse-cdn.com/v4/letter/d/ea666f/32.png) [@doug1e](https://forum.ionicframework.com/u/doug1e)\
**Post date:** [September 6, 2018, 5:33pm UTC](https://forum.ionicframework.com/t/ionic-v4-popup-width-adjustment/140728/4 "2018-09-06T17:33:36Z")

</div>

Thanks Richards, appreciate the reply

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:18pm UTC](https://forum.ionicframework.com/t/ionic-v4-popup-width-adjustment/140728/5 "2021-07-19T21:18:00Z")

</div>

Closed on July 19, 2021, 9:18pm UTC


