css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <section class="section section-form">
    <br />
    <form>
        <h3>Contact Information</h3>
        <div class="input-group error">
            <label for="eamil">Email Address</label>
            <input id="eamil" type="text" placeholder="Input your email address" />
            <div class="message error">
                <i></i>
                <div class="message-content">
                    Useful and easy to understand validation feedback
                </div>
            </div>
        </div>
        <div class="input-group">
            <label for="details">Details</label>
            <textarea id="details" cols="10" placeholder="Input details">Yesterday, at band camp, I noticed that my drive was no longer working as expected.In fact, it was working in a very unexpected way. Can you please make sure it will work as expected again?</textarea>

            <div class="message">
                <i></i>
                <div class="message-content">
                    Information to help the user provide the right input
                </div>
            </div>
        </div>
        <div class="input-group">
            <label>Are you happy?</label>
            <label class="inline-radio" for="yes">
                <input id="yes" type="radio" name="radio" /> Yes
            </label>
            <label class="inline-radio" for="no">
                <input id="no" type="radio" name="radio" /> No
            </label>

        </div>
        <div class="input-group">
            <label>What do you link?</label>
            <label class="inline-checkbox" for="money">
                <input id="money" type="checkbox" /> Money
            </label>
            <label class="inline-checkbox" for="power">
                <input id="power" type="checkbox" /> Power
            </label>
            <label class="inline-checkbox" for="free">
                <input id="free" type="checkbox" /> Free
            </label>
        </div>
        <div class="input-group">
            <label>
                <input type="checkbox" /> I have read and understood the <a href="#">Data Protection act compliance statement</a>
            </label>
        </div>
        <div>
            <input type="submit" class="btn btn-red btn-medium" value="Submit" />
        </div>
    </form>
    
</section>
            
          
!
            
              body{
  font-size:16px;
}
.section-form {
    max-width: 960px;
    margin:0 auto;
  .btn{
    white-space: nowrap;
    vertical-align: middle;
    text-align: center;
    text-decoration: none;
    line-height: normal;
    color: #fff;
    cursor: pointer;
    user-select: none;
    border: none;
    border-radius: 0;
    transition: background 150ms ease-in;
    background-color: #A20520;
    &:hover{
      background-color: #000;
    }
    &.btn-medium {
    font-size: 1rem;
    padding: .5rem 2rem .6rem;
  }
  }
    .input-group {
        margin-bottom: 1.5rem;

        label {
            color: #282828;
            display: block;
            font-size: 14px;

            &.inline-radio,
            &.inline-checkbox {
                display: inline-block;
                margin-right: 1.5rem;
            }
        }

        input, textarea {
            border: none;
            border-bottom: 1px solid #999;
            line-height: 1.5rem;
            padding-bottom: 0.4rem;

            &:focus {
                outline: none;
            }

            width: 100%;
        }

        textarea {
            display: block;
        }

        input[type=radio], input[type=checkbox] {
            width: auto;
            margin-right: .2rem;
        }
    }

    .message {
        i {
            border-top: 2px solid #fff;
            border-left: 8px solid #fff;
            border-right: 8px solid #fff;
            border-bottom: 8px solid #DFDDDD;
            display: block;
            float: left;
            margin-left: 0.5rem;
        }

        .message-content {
            background-color: #DFDDDD;
            float: none;
            clear: both;
            padding: .5rem;
            font-size: 14px;
        }

        &.error {
            display: none;

            i {
                border-bottom: 8px solid #ca2026;
            }

            .message-content {
                background-color: #ca2026;
                color: #fff;
            }
        }
    }
    /*Validation error*/
    .error {
        label {
            color: #ca2026;
        }

        .message.error {
            display: block;
        }

        input, textarea {
            border-bottom-color: #ca2026;
          color:#ca2026;
        }
    }
}
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console