I'm attempting to create a hover effect here, where hovering inside the border triggers a "grow" effect similar to this site.
I have tried copying the code provided here and adding it to the .hover
class, but nothing seems to happen.
HTML:
<?php include('server.php') ?>
<!DOCTYPE html>
<html >
<head>
<title>Log In</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body style="background-image: url('./image5.jpg'); background-size: 100% 100vh; ">
<div class="hover">
<div class="header" style="background: rgba(76, 175, 80, 0.1);">
<h2 style="color: #FFFACD;">Register</h2>
</div>
<form method="post" action="register.php" style="background: rgba(76, 175, 80, 0.2);" >
<?php include('errors.php'); ?>
<div class="input-group" >
<label style="color: #FFFACD;">Username</label>
<input type="text" name="username" value="<?php echo $username; ?>" style="background: rgba(0, 0, 250, 0.1);" >
</div>
<div class="input-group">
<label style="color: #FFFACD;">Email</label>
<input type="email" name="email" value="<?php echo $email; ?>" style="background: rgba(0, 0, 250, 0.1);">
</div>
<div class="input-group">
<label style="color: #FFFACD;">Password</label>
<input type="password" name="password_1" style="background: rgba(0, 0, 250, 0.1);">
</div>
<div class="input-group">
<label style="color: #FFFACD;">Confirm password</label>
<input type="password" name="password_2" style="background: rgba(0, 0, 250, 0.1);">
</div>
<div class="input-group">
<button type="submit" class="btn" name="reg_user" style="background: rgba(0, 0, 250, 0.1);">Register</button>
</div>
<p style="color: #FFFACD;">
Already a member? <a href="login.php" style="color: #6495ED;">Sign in</a>
</p>
</form>
</div>
</body>
</html>
CSS:
* {
margin: 0px;
padding: 0px;
}
body {
font-size: 120%;
background: #F8F8FF;
}
.header {
width: 30%;
margin: 50px auto 0px;
color: white;
background: #5F9EA0;
text-align: center;
border: 1px solid #B0C4DE;
border-bottom: none;
border-radius: 10px 10px 0px 0px;
padding: 20px;
}
.hover {
/*display: inline-block; - I exclude this because of display issue */
vertical-align: middle;
-webkit-transform: perspective(1px) translateZ(0);
transform: perspective(1px) translateZ(0);
box-shadow: 0 0 1px rgba(0, 0, 0, 0);
-webkit-transition-duration: 0.3s;
transition-duration: 0.3s;
-webkit-transition-property: transform;
transition-property: transform;
}
form, .content {
width: 30%;
margin: 0px auto;
padding: 20px;
border: 1px solid #B0C4DE;
background: white;
border-radius: 0px 0px 10px 10px;
}
.input-group {
margin: 10px 0px 10px 0px;
}
.input-group label {
display: block;
text-align: left;
margin: 3px;
}
.input-group input {
height: 30px;
width: 93%;
padding: 5px 10px;
font-size: 16px;
border-radius: 5px;
border: 1px solid gray;
}
.btn {
padding: 10px;
font-size: 15px;
color: white;
background: #5F9EA0;
border: none;
border-radius: 5px;
}
.error {
width: 92%;
margin: 0px auto;
padding: 10px;
border: 1px solid #a94442;
color: #a94442;
background: #f2dede;
border-radius: 5px;
text-align: left;
}
.success {
color: #3c763d;
background: #dff0d8;
border: 1px solid #3c763d;
margin-bottom: 20px;
}