login form with background image in html

Solutions on MaxInterview for login form with background image in html by the best coders in the world

showing results for - "login form with background image in html"
Erica
07 Feb 2017
1<!--html here -->
2<div class="bg-img">
3  <form action="/login" class="container" method="post" >
4    <h1>Login</h1>
5
6    <label for="email"><b>Email</b></label>
7    <input type="text" placeholder="Enter Email" name="email" required>
8
9    <label for="psw"><b>Password</b></label>
10    <input type="password" placeholder="Enter Password" name="psw" required>
11
12    <button type="submit" class="btn">Login</button>
13  </form>
14</div>
15
16<!-- CSS Adding bg image -->
17<style>
18.bg-img {
19  /* The image used */
20  background-image: url("img_nature.jpg");
21
22  /* Control the height of the image */
23  min-height: 380px;
24
25  /* Center and scale the image nicely */
26  background-position: center;
27  background-repeat: no-repeat;
28  background-size: cover;
29  position: relative;
30  
31}
32  </style>