+ 1
How to maximize an element's height based on a device's height in html5 or css3?
8 Respostas
+ 1
position: fixed;
top: 0;
height: 100vh
+ 2
Calviղ how to do this without fix position?
+ 1
"position: fixed;" will make the element's position relative to the viewport
However, I'm not sure that's what Alex is trying to ask. I think it's more complicated than that. Try:
https://css-tricks.com/css-media-queries/
But typically we would make the element width match the viewport width and let the content flow vertically. Maybe Alex's use case is different.
+ 1
Calvin thank you so much it worked!
+ 1
Calviղ okay
0
you can mack your height 100%
height:100%;
0
it doesn't work.
0
BALOOCH ANZARAHMEDKHAN ZAKIRAHMEDKHAN
you could use position:absolute to refer the its parent point.