+ 7
Full height of div element
How to give a div as well as its child div to height 100% that it will cover full height of the browser. Note:- I already gave 100% to both. but it covers only the content part, not the full height of the browser. <div class="parent"> <div id="child">Content goes here</div> </div> what will be its CSS according to my question?
7 Respuestas
+ 1
I just tried and it's working. Kindly share the link of your code.
+ 4
Vasiliy Thanks Man.. It worked 😊.
+ 3
Shashi Ranjan Yes tried..No change
+ 3
DIPTIRANI, You can use this code :-
. parent {
height: 100vh;
width: 100%;
}
.child {
height: 100%;
width: 100%;
}
+ 2
Diptirani Sahu
CSS
html, body, div {height: 100%;}
+ 1
Did you tried giving an absolute position to parent element? It should work.
+ 1
Diptirani Sahu
Often the world is much simpler than we think.☺