Morteza Negahi
Morteza Negahi

Reputation: 232

How can i set responsive height to my div children?

I have a parent div with class right with (position , Relative).
In (right) I have five div.cover with (position , Relative) . How can I set device height to covers? And how can I set (right) height to device height * 5 ?

enter image description here

I Cant remove position , Relative to my classes.

Thanks and sorry about my terrible English

Upvotes: 2

Views: 135

Answers (1)

Rafael Cavalcante
Rafael Cavalcante

Reputation: 417

Try the vh unit.

"VH" stands for "Viewport Height". It's the actual viewport height. 100vw = 100%, 50vw is 50% of viewport height, and so it goes.

You can read later about vh, vw, vmax, vmin, etc.

Upvotes: 2

Related Questions