How should I make the height to be responsive? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How should I make the height to be responsive?

Right sidebar's height is fixed with px. How should I make it's height to be as much as it's on the left side? Without tables, flexbox, bootstrap or js? https://code.sololearn.com/Woyf3NyZOqN2/?ref=app

15th May 2019, 1:01 AM
Сергей Чернышов
Сергей Чернышов - avatar
6 Answers
+ 1
To make the sidebar take up as much space as the height of the screen, set it's height to 100vh #sidebar{ height:100vh; }
15th May 2019, 2:01 AM
Dlite
Dlite - avatar
0
Finally I used height in px both parts. But it doesn't look as good as it should, when I rotate my phone 90°. Empty space appears bottom
15th May 2019, 1:09 AM
Сергей Чернышов
Сергей Чернышов - avatar
- 1
Empty space solved by adding padding to the #main2
15th May 2019, 1:27 AM
Сергей Чернышов
Сергей Чернышов - avatar
- 1
Tryed 100vh and result wasn't right. It became longer than it had been with 100% property but shorter than the left side was.
15th May 2019, 2:19 AM
Сергей Чернышов
Сергей Чернышов - avatar
- 1
Give a height in %
15th May 2019, 2:47 AM
Janbaz Khan
Janbaz Khan - avatar
- 1
It doesn't work
15th May 2019, 3:47 AM
Сергей Чернышов
Сергей Чернышов - avatar