Vh, wh does not work, what could be the reason?

  • 0
    Good day. Please tell a completely beginner what I was blunt about. I try to make a fullscreen slider, but when jquery is connected, it does not expand to full screen. Thanks in advance.
    Link jsfiddle
    JavaScript Anonymous, Feb 7, 2019

  • 2 Answers
  • 0
    The slider is stretched by the content, the slides simply have nothing to count 100% of the heights they are given.

    .slider__slide {
    /* изменяем внешний контейнер на viewport величины */
    height: 100vh;
    width: 100vw;
    }
    /* прописываем высоту внутренним контейнерам */
    .slick-list, .slick-track {
    height: 100%;
    }
    Anastasia Hines

  • 0
    You have 100vh and 100vw being overwritten with slider styles. Alternatively, add 100vh! Important; and 100vw! important, but ideally somehow figure it out differently, for example, rewrite the slider styles \ disable the standard styles and add your own completely, twist the settings differently.
    Anonymous

Your Answer
To place the code, please use CodePen or similar tool. Thanks you!