Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ 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

Save Automatically?

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="wrapper">
  <header class="nav-header">
    <nav>
      <ul>
        <li>
          <a href="#">Home</a>
        </li>
        <li>
          <a href="#">Geekstuff</a>
        </li>
        <li>
          <a href="#" class="is-active">CreativeCoder</a>
        </li>
        <li>
          <a href="#">Coffee</a>
        </li>
      </ul>
    </nav>
  </header>
  <form action="" method="POST">
    <h1>Responsive Form</h1>
    <div class="row">
      <div class="col col50">
        <div class="input">
          <label for="firstname">Vorname:</label>
          <input type="text" id="firstname" placeholder="Vorname" class="field">
        </div>
      </div>
      <div class="col col50">
        <div class="input">
          <label for="lastname">Nachname:</label>
          <input type="text" id="lastname" placeholder="Nachname" class="field">
        </div>
      </div>
    </div>
    <div class="row">
      <div class="col col50">
        <div class="input">
          <label for="telefon">Telefon:</label>
          <input type="tel" id="telefon" placeholder="+49 555 555 55" class="field">
        </div>
      </div>
      <div class="col col50">
        <div class="input">
          <label for="email">E-Mail:</label>
          <input type="email" id="email" placeholder="foo@bar.xy" class="field">
        </div>
      </div>
    </div>
    <div class="row">
      <div class="col">
        <div class="input">
        <label for="text">Dein Text:</label>
          <textarea id="text" class="field" rows="6"></textarea>
        </div>
      </div>
    </div>
    <div class="row">
      <div class="col col33">
        <div class="input">
          <label for="vegs">Lieblingsobst</label>
          <select name="vegs" id="vegs" class="field">
            <option value="" selected disabled>Bitte wählen</option>
            <option value="banana">Bananen</option>
            <option value="apple">Äpfel</option>
            <option value="orange">Orangen</option>
          </select>
        </div>
      </div>
      <div class="col col33">
        <label class="textlabel checkbox">
          <input type="checkbox" name="agb" value="ja" checked>
          AGB akzeptieren
        </label>
      </div>
      <div class="col col33">
        <span class="label">Ihr Geschlecht:</span>

        <label class="textlabel">
          <input type="radio" name="geschlecht" value="frau" checked>
          Weiblich
        </label>

        <label class="textlabel">
          <input type="radio" name="geschlecht" value="mann">
          Männlich
        </label>  
      </div>
    </div>
    <button type="button">Senden</button>
  </form>
  <footer class="footer">
    Made with <span>♥</span> for CreativeCoder 2016
  </footer>
</div>

              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=Bitter|Dosis:400,700');

$base-color: #143544;
$standard-distance: 24px;
$orange-faded: rgb(255, 238, 231);

html {
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

a {
  color: $base-color;
  text-decoration: none;
}

body {
  background: $base-color;
  font-family: 'Dosis', sans-serif;
  color: white;

}

h1 {
  font-family: 'Bitter', serif;
  color: white;
}

form {
  padding: 0 ($standard-distance/2);
}

.row {
  margin: 0 0 $standard-distance 0;
}

.col {
 width: 100%;
 margin-bottom: $standard-distance;
}

@media (min-width: 400px) {
  .row {
    overflow: hidden;
    margin: ($standard-distance/2) 0 ($standard-distance/2) (-$standard-distance);
  }
  .col {
    float: left;
    padding-left: $standard-distance;
    margin-bottom: 0;

    &.col50 {
      width: 50%;
    }

    &.col33 {
      width: 33.33333%;
    }

    &.col25 {
      width: 25%;
    }
  }
  form {
    padding: 0 ($standard-distance);
  }
}

.wrapper {
  max-width: 640px;
  height: 100vh;
  margin: 0 auto;
}

//////// styling des Formulars 

button {
  margin: 0 0 80px;
  height: 45px;
  width: 120px;
  background: white;
  border: 1px solid darkgrey;
  &:hover {
    color: orangered;
    font-weight: 700;
    box-shadow: 0 5px 10px rgba(0,0,0, 0.5);
  }
}

textarea {
  width: 100%;
}

label, .label {
  display: block;
  font-size: 0.9em;
  color: white;
  margin-bottom: 5px;
  
  &.checkbox {
    width: 100%;
  }
}


.field {
  width: 100%;
  padding: 5px;
  margin: 5px 0;
  &:focus {
    box-shadow: 0 0 10px white;
  }
}

// Styling der Navigation

.nav-header {
  background: white;
  box-shadow: 0 5px 10px rgba(0,0,0, 0.5);
}

ul {
  margin: 0 0 45px;
  padding: 5px 0;
}

li {
  list-style: none;
  text-align: center;
  display: block;
  &:hover > a, a.is-active {
    color: orangered;
  }
  
  a {
    height: 100%;
    width: 100%;
    padding-top: 4px;
    display: inline-block;
    margin: 10px auto;
    font-weight: 700;
  }
}

@media (min-width: 400px) {
  ul {
    width: 100%;
    height: 54px;
    overflow: hidden;

    li {
      display: inline-block;
      width: 25%;
      float: left;
      margin-top: 0;
      &:hover {
        border-bottom: 5px solid orangered;
      }
    }
  }
}

.footer {
  color: darkgray;
  font-size: .85em;
  span {
    color: red;
  }
  height: 40px;
  background: white;
  position: fixed;
  bottom: 0;
  width: 100%;
  box-shadow: 0 -5px 10px rgba(0,0,0, 0.5);
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  padding-top: 10px;
}  
              
            
!

JS

              
                
              
            
!
999px

Console