Creating a Hero Section with contact form Using HTML CSS.[Source Code]
To make this website, you would like to make three files: an HTML file, a CSS file. First, create an HTML file with the name of index.html and remember, you have to create a file with a .html extension.
@import url('https://fonts.googleapis.com/css2?family=Ubuntu:wght@500&display=swap');
*{
margin: 0;
padding: 0;
font-family: 'Poppins', sans-serif;
}
body{
background: #0F2027;
font-family: Arial, sans-serif;
}
html, body {
height: 100%;
}
.hero {
display: flex;
justify-content: space-between;
align-items: center;
background-color: #f9f9f9;
padding: 50px;
height:90vh;
background: #F2994A; /* fallback for old browsers */
background: -webkit-linear-gradient(to right, #F2C94C, #F2994A); /* Chrome 10-25, Safari 5.1-6 */
background: linear-gradient(to right, #F2C94C, #F2994A); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
}
.container {
width: 45%;
padding: 20px;
border-radius: 5px;
}
.container h2 {
font-size: 46px;
margin-bottom: 20px;
font-family: 'Ubuntu', sans-serif;
}
.container p {
font-size: 18px;
line-height: 1.5;
margin-bottom: 20px;
}
.left img{
width:200px;
height:200px;
margin:0px 30%;
}
.right{
background-color:#000;
border-radius: 10px;
box-shadow: 0 15px 35px rgba(0,0,0,0.5);
}
.container button {
display:inline-block;
padding: 10px 20px;
background: #000000; /* fallback for old browsers */
background: -webkit-linear-gradient(to right, #434343, #000000); /* Chrome 10-25, Safari 5.1-6 */
background: linear-gradient(to right, #434343, #000000); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
color: #fff;
border: none;
border-radius: 5px;
font-size: 18px;
cursor: pointer;
}
.container button:hover {
background-color: #0069d9;
}
.container form {
display: flex;
flex-direction: column;
}
.container h3 {
font-size: 44px;
margin-bottom: 20px;
color: #F2994A;
text-align: center;
}
.container label {
font-size: 18px;
margin-bottom: 10px;
color: #F2994A;
}
.container input,
.container textarea {
padding: 10px;
border-radius: 5px;
border: none;
margin-bottom: 20px;
background-color: #F2C94C;
}
.container input:focus,
.container textarea:focus {
border: 1px solid #007bff;
outline: none;
}
.container input[type="submit"] {
background: #000000;
background: -webkit-linear-gradient(to right, #434343, #000000);
background: linear-gradient(to right, #434343, #000000);
color: #fff;
border: none;
border-radius: 5px;
padding: 10px 20px;
font-size: 18px;
cursor: pointer;
}
.container input[type="submit"]:hover {
background-color: #0069d9;
}
.credit a {
text-decoration: none;
color: #F2C94C;
font-weight: 800;
}
.credit {
color: #fff;
text-align: center;
margin-top: 10px;
font-family: Verdana,Geneva,Tahoma,sans-serif;
}
Thank you for reading our blog. If you face any problem in Creating a Hero Section with contact form Using HTML CSS., then contact us or comment to us. We’ll try to provide a solution to your problem as soon as possible.
code developed by our student SUBHASRI K
Explore
Press The Key ' p ' and say ' read article ' our voice assistant read our article.
In Our older post it doesnot work we working on that.
In Our older post it doesnot work we working on that.
Post a Comment
Thank you
Learning robo team