# Right-buttons width calculation in Android with beta14

**URL:** <https://forum.ionicframework.com/t/right-buttons-width-calculation-in-android-with-beta14/14604>\
**Category:** ionic-v1\
**Created:** [December 23, 2014, 1:55am UTC](https://forum.ionicframework.com/t/right-buttons-width-calculation-in-android-with-beta14/14604 "2014-12-23T01:55:28Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rbarriuso](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rbarriuso/32/9038_2.png) [@rbarriuso](https://forum.ionicframework.com/u/rbarriuso)\
**Post date:** [December 23, 2014, 1:55am UTC](https://forum.ionicframework.com/t/right-buttons-width-calculation-in-android-with-beta14/14604/1 "2014-12-23T01:55:28Z")

</div>

Hi all,

I’m trying to migrate an Ionic app from beta13 to beta14 but I found a weird issue. The app is based on the side-menu starter template but with the menu on the right side. On some screens we add an extra `button` to the left of the menu toggle button, that is, adding a `button` before the `button menu-toggle` in the `<ion-nav-buttons side="right">` container directive. It worked fine until beta14.

The problem is that in beta14 the toggle button is pushed to the next line if we add the extra button, that is, the menu toggle button is placed **under** the other button instead of on the right of the nav bar.  
I couldn’t reproduce the issue on a browser, only on some Android devices (namely a Sony Xperia M2 with Android 4.4.2), but here’s how it looks like: [http://codepen.io/anon/pen/KwgwGB](http://codepen.io/anon/pen/KwgwGB)

I debugged remotely the Android device with Chrome DevTools and found that the `<span class="right-buttons">` generated by `ion-nav-buttons` has an insufficient width to contain both buttons. In my case the width set by Ionic is `83.46875px`. If changed to `84px` the problem goes away, so it looks like some kind of rounding issue.

Is this a bug?. Is there a workaround?.

Thanks beforehand.  
Regards,  
Rafa.

EDIT: can’t reproduce the issue on Ionic Lab

---

<div class="post-metadata">

**Author:** ![rbarriuso](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rbarriuso/32/9038_2.png) [@rbarriuso](https://forum.ionicframework.com/u/rbarriuso)\
**Post date:** [December 28, 2014, 8:17pm UTC](https://forum.ionicframework.com/t/right-buttons-width-calculation-in-android-with-beta14/14604/2 "2014-12-28T20:17:34Z")

</div>

I’ve confirmed the same issue with the nightly build. Has anyone else seen this issue?

---

<div class="post-metadata">

**Author:** ![rbarriuso](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rbarriuso/32/9038_2.png) [@rbarriuso](https://forum.ionicframework.com/u/rbarriuso)\
**Post date:** [January 2, 2015, 11:20am UTC](https://forum.ionicframework.com/t/right-buttons-width-calculation-in-android-with-beta14/14604/3 "2015-01-02T11:20:05Z")

</div>

No one could reproduce it? Any idea how to fix it?

---

<div class="post-metadata">

**Author:** ![rbarriuso](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rbarriuso/32/9038_2.png) [@rbarriuso](https://forum.ionicframework.com/u/rbarriuso)\
**Post date:** [January 5, 2015, 12:26am UTC](https://forum.ionicframework.com/t/right-buttons-width-calculation-in-android-with-beta14/14604/4 "2015-01-05T00:26:27Z")

</div>

I managed to workaround the problem by adding the following CSS rule:  
`
.bar.bar-header .buttons{
font-size: 95%;
}
`

Should I submit a new bug report?

---

<div class="post-metadata">

**Author:** ![marcus](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/marcus/32/71139_2.png) [@marcus](https://forum.ionicframework.com/u/marcus)\
**Post date:** [January 21, 2015, 8:07pm UTC](https://forum.ionicframework.com/t/right-buttons-width-calculation-in-android-with-beta14/14604/5 "2015-01-21T20:07:55Z")

</div>

I can confirm that I am having this issue as well. Simply rounding up the width of that span fixed it. Will try your fix for now.

---

<div class="post-metadata">

**Author:** ![rbarriuso](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rbarriuso/32/9038_2.png) [@rbarriuso](https://forum.ionicframework.com/u/rbarriuso)\
**Post date:** [January 21, 2015, 10:45pm UTC](https://forum.ionicframework.com/t/right-buttons-width-calculation-in-android-with-beta14/14604/6 "2015-01-21T22:45:26Z")

</div>

I thought I was the only one having this problem. Let me know if you find a better way to fix it.  
Thanks!

---

<div class="post-metadata">

**Author:** ![jough](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/jough/32/7887_2.png) [@jough](https://forum.ionicframework.com/u/jough)\
**Post date:** [March 25, 2015, 3:12pm UTC](https://forum.ionicframework.com/t/right-buttons-width-calculation-in-android-with-beta14/14604/7 "2015-03-25T15:12:02Z")

</div>

Looks like this is still a bug in RC1.
