<body>
<section class="contact">
<div class="cont container">
<div class="contact-text">
<p>Drop your inquiry here and our experts will get back to you.</p>
<h6>Address</h6>
<p class="address">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Distinctio, rerum.
</p>
<h6>Email</h6>
<p class="mail">contactus@gmail.com</p>
</div>
<div class="contact-form">
<form>
<label for="name">Name</label>
<input type="text" name="name" id="name" required>
<label for="email">Email</label>
<input type="email" name="email" id="email" required>
<label for="message">Message</label>
<textarea name="message" id="message" cols="30" rows="5" required></textarea>
<input type="submit" value="submit">
</form>
</div>
</div>
</section>
</body>
@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
*::after,
*::before {
box-sizing: border-box;
padding: 0;
margin: 0;
}
:root {
--primary-color: #fff;
--grey-color: #666;
--dar-blue-color: hsl(223deg 57% 12%);
--medium-font-size: 20px;
--small-font-size: 16px;
}
body {
font-family: "Poppins", sans-serif;
display: flex;
justify-content: center;
align-items: center;
}
.container {
max-width: 1200px;
width: 90%;
margin: auto;
}
/* -======= Contact =====- */
.contact {
padding-top: 100px;
padding-bottom: 100px;
background-color: var(--primary-color);
}
.cont {
display: flex;
align-items: center;
justify-content: space-between;
padding-top: 60px;
}
contact-text {
flex-basis: 48%;
}
.contact-text p {
font-size: 32px;
margin-bottom: 30px;
margin-right: 40px;
}
.contact-text h6,
.contact-text .address,
.contact-text .mail {
font-size: var(--medium-font-size);
}
.contact-text h6 {
color: var(--dar-blue-color);
}
.contact-form {
flex-basis: 48%;
}
.cont .contact-form form {
display: flex;
flex-direction: column;
}
.cont .contact-form form label {
font-size: var(--medium-font-size);
padding: 10px 0;
}
.cont .contact-form form input,
.cont .contact-form form textarea {
font-size: var(--medium-font-size);
padding: 10px 0;
resize: none;
margin: 6px 0;
border-radius: 12px;
outline: none;
border: 2px solid var(--grey-color);
}
.cont .contact-form form input[type="submit"] {
margin: 16px 0;
width: 26%;
cursor: pointer;
border: 2px solid var(--dar-blue-color);
font-size: var(--medium-font-size);
background-color: var(--dar-blue-color);
color: var(--primary-color);
font-weight: 500;
transition: 0.4s;
}
.cont .contact-form form input[type="submit"]:hover {
background-color: var(--primary-color);
color: var(--dar-blue-color);
font-weight: 600;
}
/* -======= Media Queriers =====- */
@media (max-width: 500px) {
.cont {
display: block;
flex-direction: column;
}
.contact {
padding-top: 0;
}
.cont .contact-form form input,
.cont .contact-form form textarea {
width: 100%;
}
.cont .contact-form form input[type="submit"] {
width: 23%;
font-size: var(--small-font-size);
}
.contact-text p {
margin-right: 0;
}
}
@media (min-width: 501px) and (max-width: 768px) {
.cont {
display: block;
flex-direction: column;
}
.contact {
padding-top: 0;
}
.cont .contact-form form input,
.cont .contact-form form textarea {
width: 100%;
}
.cont .contact-form form input[type="submit"] {
width: 23%;
font-size: var(--small-font-size);
}
.contact-text p {
margin-right: 0;
}
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.