How to use overflow:hidden in Angular for only one page?

Discussão em 'Angular' iniciado por Maligetzian, Novembro 12, 2024.

  1. Maligetzian

    Maligetzian Guest

    I would like to make my window pane unscrollable. If I set my element to overflow: hidden, I can not scroll on any page, so I tried to do it in the CSS file of the component which I want unscrollable. However, the only way I managed achieve this was adding the unscrollable class name to the element of index.html.

    .unscrollable{
    overflow: hidden;
    }


    However, in that case, all windows are unscrollable wherever I navigate on the page.

    I tried to solve the problem by adding the following only to the component's CSS file:

    .unscrollable{
    overflow: hidden !important;
    }


    but to no avail.

    Does anyone have an idea on how to solve it? I am very confused by not being able to influence index.html depending on the component, especially since the tag is there.

    Continue reading...

Compartilhe esta Página