Struggling to apply a linear gradient background to the login page on my website, I'm encountering difficulties in getting it to work.
#login {
background: linear-gradient(red, yellow) !important;
}
#login .container-bg {
background-color: #fff;
min-width: 25rem;
min-height: 30rem;
width: 15vw;
height: 50vh;
border-radius: 16px;
-moz-box-shadow: 0 0 8px 4px #e8e8e8;
-webkit-box-shadow: 0 0 8px 4px #e8e8e8;
box-shadow: 0 0 8px 4px #e8e8e8;
}
<body id="login" class="vh-center">
<div class="container-bg">
</div>
</body>
Although it works in the snippet provided, applying #login{background: red;}
successfully changes the background to red. However, when switching to
#login {background: linear-gradient(red, yellow) !important;}
, for some reason, the background turns white as shown in the screenshot below.
I am utilizing Bootstrap 4 in my codebase.
css
#login {
background: linear-gradient(red, yellow);
}
Screenshot:
https://i.sstatic.net/mEQxy.png
css
#login {
background: red;
}
Screenshot: