I am trying to set up a gradient which covers the whole page
This is my code:
#login .row div:nth-of-type(1) {
height: 100vh;
max-height: 1%;
background: #642B73; /* fallback for old browsers */
background: -webkit-linear-gradient(to right, #C6426E, #642B73); /* Chrome 10-25, Safari 5.1-6 */
background: linear-gradient(to right, #C6426E, #642B73); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome
26+, Opera 12+, Safari 7+ */
}
<div id="main">
<div class="container-fluid" id="app">
<div id="login">
<div class="row">
<div class="col-md"></div>
</div>
</div>
</div>
(I know I have written max-height: 1%;
, read on)
Now as I said height: 100%;
wasn't working, so I tried using various inputs, what I saw was when I used pixels for max-height, there were changes to the height of the gradient but no matter what input I choose for max-height
in percentage, height of the gradient would remain the same, for example here in my code I have used max-height: 1%;
and the gradient is still going beyond the height of the webpage.
I checked in the dev-tools and the max-height property was getting applied, so I am confused what is up?