I am trying to add a linear gradient background to the login page of my website, however I cannot seem to get 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>
This is working in the snippet but not in my code. Adding #login{background: red;}
changes that background to the colour red. However if I were to change this to #login {background: linear-gradient(red, yellow) !important;}
then the background of the page is white as you can see from the screenshot below.
I have using Bootstrap 4 if that makes a difference.
css
#login {
background: linear-gradient(red, yellow);
}
Screenshot:
css
#login {
background: red;
}
Screenshot: