added contact form

This commit is contained in:
JSriwongsa 2023-05-22 18:08:15 -05:00
parent 4e8d40809c
commit f785c0fd46
2 changed files with 219 additions and 0 deletions

View file

@ -0,0 +1,68 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Contact</title>
<link rel="stylesheet" href="style_contact.css">
<link rel="stylesheet" href="style.css">
<link rel="shortcut icon" href="images/title.png">
<link href='https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css' rel='stylesheet'>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Klee+One:wght@400;600&family=Montserrat:wght@300;400;500;600;700;800;900&family=Norican&display=swap" rel="stylesheet">
</head>
<body>
<header>
<div class="nav container">
<a href="index.html" class="logo">
<img src="images/logo1.png" alt="" class="logo-img">
</a>
<div class="search-box">
<input type="search" name="" id="search-input" placeholder="Search">
<i class='bx bx-search'></i>
</div>
<div class="navbar">
<a href="index.html" class="nav-link nav-active">
<i class='bx bxs-home'></i>
<span class="nav-link-title">HOME</span>
</a>
<a href="" class="nav-link">
<i class='bx bx-basket'></i>
<span class="nav-link-title">Shop</span>
</a>
<a href="" class="nav-link">
<i class='bx bx-book-bookmark' ></i>
<span class="nav-link-title">Blog</span>
</a>
<a href="" class="nav-link">
<i class='bx bxs-florist'></i>
<span class="nav-link-title">About Us</span>
</a>
<a href="" class="nav-link">
<i class='bx bx-phone-call'></i>
<span class="nav-link-title">Contact</span>
</a>
</div>
</div>
</header>
<div class="contact-container">
<div class="contact-box">
<div class="left"></div>
<div class="right">
<h2>Contact Us</h2>
<input type="text" class="field" placeholder="Your Name">
<input type="text" class="field" placeholder="Your Last name">
<input type="email" class="field" placeholder="Your Email">
<textarea class="field area" placeholder="Message"></textarea>
<button class="button-btn">Send</button>
</div>
</div>
</div>
<div class="end-text">
<p>&#169; Flora All Rights Reserved </p>
</div>
</body>
</html>

View file

@ -0,0 +1,151 @@
*{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Klee One', cursive;
list-style: none;
text-decoration: none;
scroll-behavior: smooth;
}
:root{
--bg-color:snow;
--main-color:lightcoral;
--minor-color:rgb(49, 48, 48);
--other-color:dimgray;
--text-color:black;
--head-font:5rem;
--h2-font:3rem;
--p-font:1.5rem;
}
body{
width: 100%;
height: 100vh;
}
.contact-container{
position: relative;
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
padding: 20px 100px;
}
.contact-box{
max-width: 850px;
margin-top: 10%;
display: grid;
grid-template-columns: repeat(2,1fr);
justify-content: center;
align-items: center;
text-align: center;
background-color: var(--bg-color);
box-shadow: 0px 0px 15px 5px rgba(0,0,0,0.2);
}
.left{
height: 100%;
background: url(images/bl3.jpg) no-repeat center;
background-size: cover;
}.right{
padding: 25px 40px;
}
h2{
padding-bottom: 10px;
margin-top: 8%;
margin-bottom: 5%;
position: relative;
font-family: 'Norican', cursive;
font-size: 2rem;
}
h2:after{
content: '';
position: absolute;
left: 50%;
bottom: 0;
transform: translateX(-50%);
height: 4px;
width: 50px;
border-radius: 2px;
background-color: var(--main-color);
}
.field{
width: 100%;
padding: 0.6rem 1rem;
outline: none;
border: none;
background-color: rgba(230, 230, 230, 0.5);
font-size: 1rem;
margin-bottom: 20px;
transition: 0.3s;
}
.area{
min-height: 150px;
}
.button-btn{
margin-top: 5%;
margin-bottom: 8%;
width: 30%;
padding: 8px 10px;
outline: none;
border: none;
font-size: 1rem;
background-color: var(--main-color);
color: white;
font-weight: 600;
border-radius: 4rem;
cursor: pointer;
}
.button-btn:hover{
background-color: rgb(239, 197, 197);
color: var(--text-color);
}
@media(max-width: 880px){
.contact-box{
grid-template-columns: 1fr;
}
.left{
height: 200px;
}
}
@media(max-width: 500px){
.contact-box{
max-width: 800px;
}
h2{
font-size: 1.5rem;
}
.field{
padding: 0.4rem 0.8rem;
font-size: 0.8rem;
}
.area{
min-height: 90px;
}
}
@media(max-width: 400px){
.field{
padding: 0.4rem 0.6rem;
font-size: 0.5rem;
}
.area{
min-height: 80px;
}
.button-btn{
width: 60%;
padding: 5px 8px;
outline: none;
border: none;
font-size: 0.6rem;
}
}
@media(max-width: 380px){
h2{
font-size: 1rem;
}
.field{
padding: 0.4rem 0.4rem;
font-size: 0.5rem;
}
.button-btn{
width: 50%;
}
}