# 3 floating buttons in a row (again). Issues when viewing on iPad

**URL:** <https://community.glideapps.com/t/3-floating-buttons-in-a-row-again-issues-when-viewing-on-ipad/41817>\
**Category:** Ask for Help\
**Created:** [May 10, 2022, 2:39pm UTC](https://community.glideapps.com/t/3-floating-buttons-in-a-row-again-issues-when-viewing-on-ipad/41817 "2022-05-10T14:39:31Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tamara\_Didenko](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/tamara_didenko/32/42215_2.png) [@Tamara\_Didenko](https://community.glideapps.com/u/Tamara_Didenko)\
**Post date:** [May 10, 2022, 2:39pm UTC](https://community.glideapps.com/t/3-floating-buttons-in-a-row-again-issues-when-viewing-on-ipad/41817/1 "2022-05-10T14:39:31Z")

</div>

I looked for a solution a couple of weeks back and was able to achieve the desired effect using [3 floating buttons + flexbox](https://community.glideapps.com/t/custom-floating-buttons-3-in-a-row-at-the-bottom-of-the-screen-one-with-text/41186/19). It works as expected on my Android phone and in the browser.

 ![CleanShot 2022-05-10 at 08.34.07](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/8/78a30391c5255caf9a33444325692183ce31bb9e.png)

However, when I checked it on my iPad, the width of those buttons is now 100% for all three (they stack on top of each other)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/0/00a115550c11fe0eea08a767e100609c700391c4.jpeg)

I don’t have an iPhone to test it, but it’s concerning that CSS is that far off 😭 Any ideas on where to even start digging? Not sure if there’s a way to “Inspect” a webpage on iPad.

---

<div class="post-metadata">

**Author:** ![11183](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/11183/32/29797_2.png) [@11183](https://community.glideapps.com/u/11183)\
**Post date:** [May 10, 2022, 3:17pm UTC](https://community.glideapps.com/t/3-floating-buttons-in-a-row-again-issues-when-viewing-on-ipad/41817/2 "2022-05-10T15:17:15Z")

</div>

Actually there IS the way to inspect a page from mobile Safari, but you need a mac)  
Not sure if you speak russian, but there it is:

[![](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/2/e27c7c1432e45422ffbfc654acc2f4a422f55184.jpeg "Как тестировать на ☎️ телефонах и эмуляторах, и почему фронтендеру никуда без макбука") ](https://www.youtube.com/watch?v=71qnSzSjCyY)

---

<div class="post-metadata">

**Author:** ![Tamara\_Didenko](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/tamara_didenko/32/42215_2.png) [@Tamara\_Didenko](https://community.glideapps.com/u/Tamara_Didenko)\
**Post date:** [May 10, 2022, 4:08pm UTC](https://community.glideapps.com/t/3-floating-buttons-in-a-row-again-issues-when-viewing-on-ipad/41817/3 "2022-05-10T16:08:19Z")

</div>

I do and I have a few macs, lol. Thank you, I’ll check it out!

---

<div class="post-metadata">

**Author:** ![Tamara\_Didenko](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/tamara_didenko/32/42215_2.png) [@Tamara\_Didenko](https://community.glideapps.com/u/Tamara_Didenko)\
**Post date:** [May 10, 2022, 4:13pm UTC](https://community.glideapps.com/t/3-floating-buttons-in-a-row-again-issues-when-viewing-on-ipad/41817/4 "2022-05-10T16:13:06Z")

</div>

> [@11183](#):
>
> Actually there IS the way to inspect a page from **mobile Safari** , but you need a mac)

The problem, actually, appears in both Chrome and Safari. So I feel like it might be more of an iPad problem than a browser. But can’t tell :-/

---

<div class="post-metadata">

**Author:** ![11183](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/11183/32/29797_2.png) [@11183](https://community.glideapps.com/u/11183)\
**Post date:** [May 10, 2022, 5:08pm UTC](https://community.glideapps.com/t/3-floating-buttons-in-a-row-again-issues-when-viewing-on-ipad/41817/5 "2022-05-10T17:08:51Z")

</div>

Developers have to use WebKit when making browser for ios, so all ios browsers are in fact — safari. Even Chrome.

---

<div class="post-metadata">

**Author:** ![Tamara\_Didenko](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/tamara_didenko/32/42215_2.png) [@Tamara\_Didenko](https://community.glideapps.com/u/Tamara_Didenko)\
**Post date:** [May 10, 2022, 6:45pm UTC](https://community.glideapps.com/t/3-floating-buttons-in-a-row-again-issues-when-viewing-on-ipad/41817/6 "2022-05-10T18:45:25Z")

</div>

Duh, that makes sense! 🤦‍♀️ Thank you, will dig into the video!

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [May 11, 2022, 12:17am UTC](https://community.glideapps.com/t/3-floating-buttons-in-a-row-again-issues-when-viewing-on-ipad/41817/7 "2022-05-11T00:17:54Z")

</div>

These width and height related things always present problems on different layouts for me. I struggle a lot to make it work both on iPad, desktop (full screen version) and mobile, so when I don’t have to make it fancy, I tend to avoid it.

If I have to, I will try to write different code snippets for each device. Can’t rely on just vw and vh, in my experience.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [May 11, 2022, 12:47am UTC](https://community.glideapps.com/t/3-floating-buttons-in-a-row-again-issues-when-viewing-on-ipad/41817/8 "2022-05-11T00:47:16Z")

</div>

@Tamara_Didenko you can use this code to get the user’s device type. Not entirely reliable, but at least you have something to work with.

`https://thinhdinhlca.github.io/get-user-device-type/`

Then what I usually do is use this with an If Then Else column.

If Mobile then Mobile Code, if Tablet then Tablet Code etc.

---

<div class="post-metadata">

**Author:** ![Tamara\_Didenko](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/tamara_didenko/32/42215_2.png) [@Tamara\_Didenko](https://community.glideapps.com/u/Tamara_Didenko)\
**Post date:** [May 11, 2022, 12:54am UTC](https://community.glideapps.com/t/3-floating-buttons-in-a-row-again-issues-when-viewing-on-ipad/41817/9 "2022-05-11T00:54:33Z")

</div>

> [@ThinhDinh](#):
>
> I struggle a lot to make it work both on iPad, desktop (full screen version) and mobile, so when I don’t have to make it fancy, I tend to avoid it.

In all three situations, I’m only looking at the mobile layout. I’m viewing the desktop version on my iPad pro, which still loads the version with all three buttons stretched across the bottom.

> [@ThinhDinh](#):
>
> Can’t rely on just vw and vh, in my experience.

I’m not using vh or vw. I’m using `flex-grow` for the middle button and `px` for the two on the side. What would be a better measurement?

* * *

So, after inspecting the code through Safari in “mobile view”, what seems to be the problem is that iOS ignores the boundaries of the `<button>` parent and just stretches the “visible” part of the button (`.floating-btn-style`) across the whole screen.  
 ![CleanShot 2022-05-10 at 18.44.50](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/5/f5727aed76b5d56d7ed1c744989134bac1f34f89.gif)

**Any ideas on how to force the visible part to behave?**  
I can definitely target it by class, but not sure what property to use.

There’s an additional problem that iOS seems to be loading those floating elements “on top of the page” instead of following the Glide’s component order… all kinds of fun stuff around that…

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [May 11, 2022, 1:11am UTC](https://community.glideapps.com/t/3-floating-buttons-in-a-row-again-issues-when-viewing-on-ipad/41817/10 "2022-05-11T01:11:22Z")

</div>

> [@Tamara\_Didenko](#):
>
> There’s an additional problem that iOS seems to be loading those floating elements “on top of the page” instead of following the Glide’s component order… all kinds of fun stuff around that

Yeah… That might be a big problem. Such a headache dealing with all different operation systems and devices…

---

<div class="post-metadata">

**Author:** ![Tamara\_Didenko](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/tamara_didenko/32/42215_2.png) [@Tamara\_Didenko](https://community.glideapps.com/u/Tamara_Didenko)\
**Post date:** [May 11, 2022, 1:15am UTC](https://community.glideapps.com/t/3-floating-buttons-in-a-row-again-issues-when-viewing-on-ipad/41817/11 "2022-05-11T01:15:54Z")

</div>

Fixed the appearance of buttons by adding `position: static` to `.floating-btn-style`… Fixing the rest now

 ![CleanShot 2022-05-10 at 19.13.29](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/d/6d1d63a11f3a82c8e0e55de784d6f4310ac7d3e4.png)

CSS works in mysterious ways… 🤦‍♀️

* * *

> [@ThinhDinh](#):
>
> Yeah… That might be a big problem. Such a headache dealing with all different operation systems and devices…

I might be able to live without edits I’ve done by targeting “numbered” elements… But yeah, what a pain 😭

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [May 12, 2022, 1:16am UTC](https://community.glideapps.com/t/3-floating-buttons-in-a-row-again-issues-when-viewing-on-ipad/41817/12 "2022-05-12T01:16:50Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
