How to remove scroll?


#1

I’m used scroll=“false” in ion-content but don’t work! I used also at the scss overflow, overflow-x, overflow-y hidden and also don’t work.


Can't hide the scroll bar in ionic 3
#2

Do you mean the overflow scroll that appears on iOS/with iOS CSS? The following might be to blame:

.content-ios:not([no-bounce]) > .scroll-content::before {
    bottom: -1px;
}

.content-ios:not([no-bounce]) > .scroll-content::after {
    top: -1px;
}

Looking at this you’re able to see what you need to do. Add “no-bounce” to your ion-content and it should be good.

<ion-content no-bounce>

If this isn’t what you mean, could you please explain further? :slight_smile:


#3

I would like to remove it for all SO’s, I used in the app.scss the following code which was the only one that worked:

.scroll-content {
        overflow: hidden !important;
    }

Is it wrong to do so?


#4

I’m still a bit unsure of what you are trying to achieve, but if it works exactly like you want it to the way you have done it, then I wouldn’t say that it’s wrong to do so :wink:

If it is specifically the bouncing you want gone, it should only be happening on iOS as far as I am aware. Otherwise try the following:

.content > .scroll-content::before {
    bottom: 0;
}

.content > .scroll-content::after {
    top: 0;
}

#5

Thanks, this got rid of my annoying scrollbar


#6

can you add below code in you app.scss

::-webkit-scrollbar,
*::-webkit-scrollbar {
display: none;
}


Can't hide the scroll bar in ionic 3
#7

Thanks brother…it work it out