# Give dynamic margin to bottom bar

**URL:** <https://community.weweb.io/t/give-dynamic-margin-to-bottom-bar/6178>\
**Category:** Ask us anything\
**Tags:** design\
**Created:** [January 3, 2024, 4:43am UTC](https://community.weweb.io/t/give-dynamic-margin-to-bottom-bar/6178 "2024-01-03T04:43:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Himanshu](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/himanshu/32/16305_2.png) [@Himanshu](https://community.weweb.io/u/Himanshu)\
**Post date:** [January 3, 2024, 4:43am UTC](https://community.weweb.io/t/give-dynamic-margin-to-bottom-bar/6178/1 "2024-01-03T04:43:13Z")

</div>

How can I give the bottom bar a margin using dvh?

The use case is the bottom bar hiding on iOS devices due to the address bar, as it is included in the vh. This hides the bottom bar on iOS. I read on the forum about using dvh as it will not include the address bar height.

But how do I bind the bottom margin?

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [January 3, 2024, 9:28am UTC](https://community.weweb.io/t/give-dynamic-margin-to-bottom-bar/6178/2 "2024-01-03T09:28:56Z")

</div>

You need to bind i like this and follow the CSS formatting convention.

In your case, for the bottom margin, it would be this:

 ![Screenshot 2024-01-03 at 10.27.51](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/4/4803f96bba16b7ee964ca5e1fac9aa8f073e8763.png)

Otherwise, it’s usually one of the others, you just need to look for which margin you need.

---

<div class="post-metadata">

**Author:** ![Himanshu](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/himanshu/32/16305_2.png) [@Himanshu](https://community.weweb.io/u/Himanshu)\
**Post date:** [January 10, 2024, 8:44am UTC](https://community.weweb.io/t/give-dynamic-margin-to-bottom-bar/6178/3 "2024-01-10T08:44:46Z")

</div>

Got it. Can we also use calc here? I tried

`0 0 calc(100dvh-env(safe-area-inset-bottom)) 0`

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [January 10, 2024, 8:59am UTC](https://community.weweb.io/t/give-dynamic-margin-to-bottom-bar/6178/4 "2024-01-10T08:59:00Z")

</div>

Yup, you can use calc. Anything that is legit in CSS should work in WeWeb’s bound formulas, at the condition that **you do it correctly**.
