# How to make elements fixed/unscrollable while the page has a scrollable element?

**URL:** <https://forum.bubble.io/t/how-to-make-elements-fixed-unscrollable-while-the-page-has-a-scrollable-element/177938>\
**Category:** Need help\
**Created:** [November 12, 2021, 11:46am UTC](https://forum.bubble.io/t/how-to-make-elements-fixed-unscrollable-while-the-page-has-a-scrollable-element/177938 "2021-11-12T11:46:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![2022.kien.letrung](https://avatars.discourse-cdn.com/v4/letter/2/e5b9ba/32.png) [@2022.kien.letrung](https://forum.bubble.io/u/2022.kien.letrung)\
**Post date:** [November 12, 2021, 11:46am UTC](https://forum.bubble.io/t/how-to-make-elements-fixed-unscrollable-while-the-page-has-a-scrollable-element/177938/1 "2021-11-12T11:46:31Z")

</div>

Hi,

The number 1 red box (in the image below) is an ext.vertical scrolling-1 row, 1 column-repeater group, and it makes my page scrollable.

However, for red box number 2,3,4,5 (in the image below) they are fixed repeater groups, and I don’t want them to be scrollable. Right now, as I scroll the repeater group red box number 1, all of them will be scrolled and dissapear below. I don’t want these boxes 2,3,4,5 to be scrolled. I want them to be fixed in the current positions in the image below. How do I do this? I struggle a lot with this and would appreciate a lot if you can help me. Thank you!

 ![Screen Shot 0003-11-12 at 20.33.10](https://us1.discourse-cdn.com/bubble/original/3X/1/0/10803e3d916729367d22047ee2c38e1db5d38452.png)

---

<div class="post-metadata">

**Author:** ![alejandrowunderlich](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/alejandrowunderlich/32/97601_2.png) [@alejandrowunderlich](https://forum.bubble.io/u/alejandrowunderlich)\
**Post date:** [November 12, 2021, 1:23pm UTC](https://forum.bubble.io/t/how-to-make-elements-fixed-unscrollable-while-the-page-has-a-scrollable-element/177938/2 "2021-11-12T13:23:27Z")

</div>

CSS magic. You can’t achieve that with Bubble vanilla alone.

Main page needs to allow scrolling but keeping it at 100% the height of the viewport:

```
page {
height: 100vh !important;
overflow: scroll;
}

```

Sidebar elements 2,3 need to be a group, same as 4 and 5. Not sure if you want your topbar to scroll, but the css you add to elements you want to stick is:

```
 #left-sidebar{
  position:absolute;
  top:0;
  left:0;
  height:100%;
 }

 #right-sidebar{
  position:absolute;
  top:0;
  right:0;
  height:100%;
 }

```

However, keep in mind what you’ll do if the viewport width becomes too narrow for these sidebars to remain on the page. You can show / hide / change their html id via conditionals.

Edit: have not tried this with the new Engine. Perhaps there’s something there that might help you.

---

<div class="post-metadata">

**Author:** ![2022.kien.letrung](https://avatars.discourse-cdn.com/v4/letter/2/e5b9ba/32.png) [@2022.kien.letrung](https://forum.bubble.io/u/2022.kien.letrung)\
**Post date:** [November 12, 2021, 2:28pm UTC](https://forum.bubble.io/t/how-to-make-elements-fixed-unscrollable-while-the-page-has-a-scrollable-element/177938/3 "2021-11-12T14:28:15Z")

</div>

Hi, thank you so much for helping me!  
I tried your solution but it didn’t work…

I added ID attribute to the top bar, left bar (i group them into 1 group as you said), right bar, and the page. I then added your CSS code into an HTML element and add this element to the page like below:

 ![Screen Shot 0003-11-12 at 23.26.06](https://us1.discourse-cdn.com/bubble/original/3X/1/1/111b4f95d84203e0419d4c2acda79a6851642431.png)

But it didn’t work… Could you help me determine what’s the problem here or what I did wrong? Thank you so much!

---

<div class="post-metadata">

**Author:** ![2022.kien.letrung](https://avatars.discourse-cdn.com/v4/letter/2/e5b9ba/32.png) [@2022.kien.letrung](https://forum.bubble.io/u/2022.kien.letrung)\
**Post date:** [November 12, 2021, 2:38pm UTC](https://forum.bubble.io/t/how-to-make-elements-fixed-unscrollable-while-the-page-has-a-scrollable-element/177938/4 "2021-11-12T14:38:21Z")

</div>

Solution, just put everything each in a Floating Group/Header. Problem solved! But thank you to @alejandrowunderlich for helping me!🙂

---

<div class="post-metadata">

**Author:** ![alejandrowunderlich](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/alejandrowunderlich/32/97601_2.png) [@alejandrowunderlich](https://forum.bubble.io/u/alejandrowunderlich)\
**Post date:** [November 12, 2021, 3:30pm UTC](https://forum.bubble.io/t/how-to-make-elements-fixed-unscrollable-while-the-page-has-a-scrollable-element/177938/5 "2021-11-12T15:30:24Z")

</div>

That’s a brilliant solution! Very happy that it worked out!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2847faa74692c2ffa5d939d3dc3724cdd060d247.png) [@system](https://forum.bubble.io/u/system)\
**Post date:** [January 21, 2022, 11:47am UTC](https://forum.bubble.io/t/how-to-make-elements-fixed-unscrollable-while-the-page-has-a-scrollable-element/177938/6 "2022-01-21T11:47:08Z")

</div>

Closed on January 21, 2022, 11:47am UTC

This topic was automatically closed after 70 days. New replies are no longer allowed.
