Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div class="container">
    <h2>Get in touch</h2>
    <p>
      Feel free to contact me about anything related to Web Development.
    </p>
    <form class="contact-form">
      <div class="input-area">
        <input type="text" placeholder="Your name"/>
      </div>
      <div class="input-area">
        <input type="email" placeholder="Email address" />
      </div>
      <div class="input-area">
        <input type="text" placeholder="Subject">
      </div>
      <div class="input-area h-80">
        <textarea placeholder="Your message"></textarea>
      </div>
      <button class="sendbtn">Send</button>
    </form>
  </div>
  <div class="social-container">
    <div class="custom-social-container">
      <p>Contact me on</p>
      <button class="cross-btn"><i class="fas fa-times"></i></button>
      <ul>
        <li>
          <a href="https://instagram.com/codewithfaraz" target="_blank" rel="nofollow">
            <i class="fab fa-instagram"></i>
          </a>
        </li>
        <li>
          <a href="https://www.youtube.com/@codewithfaraz" target="_blank" rel="nofollow">
            <i class="fab fa-youtube"></i>
          </a>
        </li>
        <li>
          <a href="https://facebook.com/codewithfaraz" target="_blank" rel="nofollow">
            <i class="fab fa-facebook"></i>
          </a>
        </li>
        <li>
          <a href="https://twitter.com/codewithfaraz" target="_blank" rel="nofollow">
            <i class="fab fa-twitter"></i>
          </a>
        </li>
        <li>
          <a href="https://linkedin.com/in/farazc60" target="_blank" rel="nofollow">
            <i class="fab fa-linkedin"></i>
          </a>
        </li>
      </ul>
    </div>
  </div>
  <button class="connect-btn">
    Get Connected
  </button>
              
            
!

CSS

              
                @import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;800;900&display=swap");

* {
	box-sizing: border-box;
}

body {
	background: #E6E6FA;
	display: flex;
	justify-content: center;
	align-items: center;
	font-family: "Poppins", sans-serif;
	min-height: 100vh;
}

.container {
	background-color: #fff;
	border: 3px solid #660033;
	border-radius: 10px;
	box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	padding: 30px 60px;
	text-align: center;
	width: 600px;
	max-width: 100%;
}

.container p {
	color: rgb(136, 136, 136);
	letter-spacing: 0.4px;
}

.container form {
	width: 100%;
}

.container .input-area {
	position: relative;
	margin: 10px 0;
	height: 44px;
	width: 100%;
}

.container .h-80 {
	height: 80px;
}

.container input, .container textarea {
  position: absolute;
	display: block;
	font-family: "Poppins", sans-serif;
	font-size: 14px;
	padding: 12px;
	height: 100%;
	width: 100%;
  border: 1px solid #999;
  border-radius: 4px;
  outline: none;
  resize: none;
}

.container .sendbtn {
  display: block;
  width: 100%;
	background: #660033;
	color: #fff;
	font-size: 18px;
	padding: 11px;
  border: none;
	border-radius: 4px;
  cursor: pointer;
}

.container .sendbtn:hover {
  background-color: #993366;
}

@media screen and (max-width: 600px) {
	.container {
		padding: 20px 30px;
	}
}

.social-container {
	position: fixed;
	right: 0;
	bottom: 80px;
	transform: translateX(100%);
	transition: transform 0.4s ease-in-out;
  z-index: 10;
}

.social-container.visible {
	transform: translateX(-10px);
}

.custom-social-container {	
	background-color: #fff;
	border-radius: 16px;
	box-shadow: 0 16px 31px -17px rgba(248, 4, 77, 0.6);
	border: 5px solid #660033;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	font-family: "Poppins", sans-serif;
	position: relative;
	height: 169px;	
	width: 370px;
	max-width: calc(100% - 10px);
}

.custom-social-container button.cross-btn {
	border: 0;
	color: #660033;
	cursor: pointer;
	font-size: 20px;
	position: absolute;
	top: 5px;
	right: 5px;
}

.custom-social-container p {
	background-color: #660033;
	border-radius: 0 0 10px 10px;
	color: #fff;
	font-size: 14px;
	line-height: 28px;
	padding: 2px 17px 6px;
	position: absolute;
	top: 0;
	left: 50%;
	margin: 0;
	transform: translateX(-50%);
	text-align: center;
	width: 215px;
}

.custom-social-container ul {
	display: flex;
	list-style-type: none;
	padding: 0;
  margin-top: 58px;
}

.custom-social-container ul li {
	margin: 0 10px;
}

.custom-social-container ul li a {
	border: 1px solid #999;
	border-radius: 50%;
	color: #660033;
	font-size: 20px;
	display: flex;
	justify-content: center;
	align-items: center;
	height: 50px;
	width: 50px;
	text-decoration: none;
}

.custom-social-container ul li a:hover {
	border-color: #ffd791;
	box-shadow: 0 9px 12px -9px #ffd791;
}

.connect-btn {
	border-radius: 26.5px;
	background-color: #660033;
	border: 1px solid #660033;
	box-shadow: 0 16px 22px -17px #660033;
	color: #fff;
	cursor: pointer;
	font-size: 16px;
	line-height: 20px;
	padding: 12px 20px;
	position: fixed;
	bottom: 20px;
	right: 20px;
	z-index: 999;
}

.connect-btn:hover {
	background-color: #993366;
}

@media screen and (max-width: 480px) {

	.social-container.visible {
		transform: translateX(0px);
	}
	
	.connect-btn {
		right: 10px;
	}
}
              
            
!

JS

              
                const contactform = document.querySelector('.contact-form');
const container = document.querySelector('.container');

contactform.addEventListener('submit', (event) => {
	event.preventDefault();
	container.innerHTML = '<p>Thanks for your message. <br /> I\'ll respond to you shortly</p>';
});

const connectbtn = document.querySelector('.connect-btn');
const crossbtn = document.querySelector('.cross-btn');
const socialcontainer = document.querySelector('.social-container');

connectbtn.addEventListener('click', () => {
	socialcontainer.classList.toggle('visible')
});

crossbtn.addEventListener('click', () => {
	socialcontainer.classList.remove('visible')
});
              
            
!
999px

Console