D
D
Dmytro Sytnik2014-07-30 18:22:54
css
Dmytro Sytnik, 2014-07-30 18:22:54

How to stretch a div or section block to the height of one screen?

I'm trying to make One Page template for joomla. I use Bootstrap 3.
I would like to make each block on the page the size of one screen, even if there is not enough content inside it. so that when you click on anchor links on the screen, the information is completely replaced with the desired one.
In code it looks like this:

<section id="slider">
     about
</section>
<section id="about">
     about
</section>
<section id="footer">
     about
</section>

An example here
I ask the help of those who know.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Y
Yuri Lobanov, 2014-07-30
@VanArman

Use the new units vh
codepen.io/iiil/pen/qbLKw
Screen height is 100vh
Support caniuse.com/#feat=viewport-units
There are other ways, in particular using js.

D
Dmytro Sytnik, 2014-07-30
@VanArman

Thank you, I've never seen this size before. And for mobile, this "feature" also works?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question