htmlintermediatemit

Contact Section

A contact form with floating labels.

5.3k1.0k1.2k440

About this module

A split contact section with a message form and contact details on the side.

#contact#form#floating

Source code

Installation

  1. 1

    Create the files

    Create `index.html` and `style.css` in the same folder.

  2. 2

    Paste the code

    Copy each file's source into its matching file.

  3. 3

    Open in the browser

    Open `index.html` in any modern browser.

Usage

  1. 1

    Copy the HTML

    Paste the section markup where you need it.

    <link rel="stylesheet" href="style.css" />
    <section class="mh-sec">
      <div class="mh-container mh-contact">
        <div class="mh-c-info">
          <span class="mh-eyebrow">Contact</span>
          <h2 class="mh-h2">Let's talk</h2>
          <p class="mh-sub">Questions, feedback or a module idea — we read everything.</p>
          <div class="mh-meta">
            <span>✉️ hello@moduleharbor.dev</span>
            <span>🐙 github.com/moduleharbor</span>
          </div>
        </div>
        <form class="mh-c-form" onsubmit="return false">
          <div class="mh-field"><input id="c-name" type="text" placeholder=" " /><label for="c-name">Your name</label></div>
          <div class="mh-field"><input id="c-mail" type="email" placeholder=" " /><label for="c-mail">Email address</label></div>
          <div class="mh-field"><textarea id="c-msg" rows="4" placeholder=" "></textarea><label for="c-msg">Message</label></div>
          <button type="submit">Send message</button>
        </form>
      </div>
    </section>
Overview
Categorysections
Frameworkhtml
Difficultyintermediate
Licensemit
Versionv1.0.0
Features
  • Fully responsive
  • Semantic markup
  • No dependencies
Traits
  • ResponsiveYes
  • Dark modeYes
  • AccessibleYes
  • Production readyYes
Browser support
  • Chrome 90+
  • Firefox 90+
  • Safari 15+
  • Edge 90+

Related modules

Command Palette

Search modules and jump anywhere