General Inquiry Contact Form is the best responsive contact form template for your portable responsive website. It has an attractive layout and responsiveness and looks good on all devices.
With its simple white interface, you can collect names, emails, contact numbers, websites, messages and other information your clients provide. This is a typical mobile responsive contact form for your website.
HTML
Before we start writing code first, we need to create a primary structure of the HTML document, so that the browser can understand and start working. The basic HTML structure looks like the following.
After writing the primary structure of the HTML document, you will also write the tags and content you need. After that, you can see the output in your browser. We know that HTML Sudu Mae is used for exposing content in a basic format. To complete our content we need to use CSS, which is an HTML insert and it creates an engaging user interface.
<!DOCTYPE html>
<html>
<head>
<title>Responsive </title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="container">
<div class="contact-box">
<div class="left"></div>
<div class="right">
<h2>Contact Us</h2>
<input type="text" name="" class="fix" placeholder="Your Name">
<input type="text" name="" class="fix" placeholder="Your Email">
<input type="text" name="" class="fix" placeholder="Your Phone">
<textarea class="fix" placeholder="Message"></textarea>
<button class="btn">Send</button>
</div>
</div>
</div>
</body>
</html>
CSS
Now, we have time to improve the HTML content, for that, we need to add CSS to the HTML file. CSS can be added to HTML documents in a total of three ways, here we are using outside CSS design using CSS will arrive here after typing and see the output in your browser.
*{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: sans-serif;
}
body{
height: 100vh;
width: 100%
}
.container{
position: relative;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
padding: 20px 100px;
}
.container:after{
content: '';
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
background: url(img.jpg) no-repeat center;
z-index: -1;
filter: blur(50px);
}
.contact-box{
max-width: 850px;
display: grid;
grid-template-columns: repeat(2,1fr);
justify-content: center;
align-items: center;
background-color: white;
}
.left{
background: url(img.jpg) no-repeat center;
background-size: cover;
height: 100%;
}
.right{
padding: 25px 40px;
}
h2{
position: relative;
padding: 0 0 10px;
margin-bottom: 10px;
}
h2:after{
content: '';
position: absolute;
left: 50%;
bottom: 0;
transform: translateX(-50%);
height: 4px;
width: 50px;
border-radius: 3px;
background-color: #2ecc71;
}
.fix{
width: 100%;
border:2px solid rgba(0 0 0 0);
outline: none;
background-color: rgba(230,230,230,0.6);
padding: 0.5rem 1rem;
font-size: 1.1rem;
margin-bottom: 22px;
transform: .3s;
}
.fix:hover{
background-color: rgba(0,0,0,0.1);
}
textarea{
min-width: 150px;
}
.btn{
width: 100%;
padding: 0.5rem 1rem;
background-color: #2ecc71;
content: #fff;
font-size: 1.1rem;
border: none;
outline: none;
cursor: pointer;
transform: 0.5s;
}
.btn:hover{
background-color: #27ae60;
}
.fix:hover{
border: 2px solid rgba(30,85,250,0.47);
background-color: #fff;
}
@media screen and (max-width: 800px){
.contact-box{
grid-template-columns: 1fr;
}
.left{
height: 200px;
}
}
No comments: