D
D
Dmitry Rudenko2021-07-07 17:29:12
css
Dmitry Rudenko, 2021-07-07 17:29:12

Why can't I make the block height 100%?

Hello, please tell me why I can't make the screen height 100% for this block?
Here are the styles:
60e5ba298de76191570009.png
What it looks like:60e5ba35205c6980046958.png

Answer the question

In order to leave comments, you need to log in

3 answer(s)
K
kryamk, 2021-07-07
@kryamk

height: 100vh;

I
Insolent Muzzle, 2021-07-07
@pluffie

The answer above is correct and your code should work.

@media screen and (min-width: 768px) and (max-width: 991)

Are you sure you're testing at resolutions less than 991px and greater than 768px?

V
valgerofficial, 2021-07-08
@valgerofficial

Don't forget about that. That with such properties, the height of the parent block should also be 100%.
Try to write:

html, body {
     height: 100%;
     min-height: 100%;
}

If it doesn't work, look at the height of the parent block.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question