1<!DOCTYPE html>
2<html>
3 <head>
4 <style>
5 /* Bordered form */
6form {
7 border: 3px solid #f1f1f1;
8}
9
10/* Full-width inputs */
11input[type=text], input[type=password] {
12 width: 100%;
13 padding: 12px 20px;
14 margin: 8px 0;
15 display: inline-block;
16 border: 1px solid #ccc;
17 box-sizing: border-box;
18}
19
20/* Set a style for all buttons */
21button {
22 background-color: #04AA6D;
23 color: white;
24 padding: 14px 20px;
25 margin: 8px 0;
26 border: none;
27 cursor: pointer;
28 width: 100%;
29}
30
31/* Add a hover effect for buttons */
32button:hover {
33 opacity: 0.8;
34}
35
36/* Extra style for the cancel button (red) */
37.cancelbtn {
38 width: auto;
39 padding: 10px 18px;
40 background-color: #f44336;
41}
42
43/* Center the avatar image inside this container */
44.imgcontainer {
45 text-align: center;
46 margin: 24px 0 12px 0;
47}
48
49/* Avatar image */
50img.avatar {
51 width: 40%;
52 border-radius: 50%;
53}
54
55/* Add padding to containers */
56.container {
57 padding: 16px;
58}
59
60/* The "Forgot password" text */
61span.psw {
62 float: right;
63 padding-top: 16px;
64}
65
66/* Change styles for span and cancel button on extra small screens */
67@media screen and (max-width: 300px) {
68 span.psw {
69 display: block;
70 float: none;
71 }
72 .cancelbtn {
73 width: 100%;
74 }
75}
76 </style>
77 </head>
78<form action="action_page.php" method="post">
79 <div class="imgcontainer">
80 <img src="img_avatar2.png" alt="Avatar" class="avatar">
81 </div>
82
83 <div class="container">
84 <label for="uname"><b>Username</b></label>
85 <input type="text" placeholder="Enter Username" name="uname" required>
86
87 <label for="psw"><b>Password</b></label>
88 <input type="password" placeholder="Enter Password" name="psw" required>
89
90 <button type="submit">Login</button>
91 <label>
92 <input type="checkbox" checked="checked" name="remember"> Remember me
93 </label>
94 </div>