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.

            
              <title>SHOW ME WHAT YOU GOT | Rick and Morty survey</title>
    <!-- font-family: 'Bungee', cursive;
         font-family: 'Source Code Pro', monospace; -->
    <link href="https://fonts.googleapis.com/css?family=Bungee|Source+Code+Pro" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="theme.css">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
    <script src="script.js"></script>

  </head>

  <body>
  <div class="container">
    <center><div class="center>"><img src="https://farm5.staticflickr.com/4241/35480732200_94e9b675ce.jpg">
    <h1 id="title">Show me what you got</h1></div></center>
  </div>

  <p id="description">Welcome, fellow human! Please let us know how you have been enjoying Rick and Morty so far.</p>

  <form id="survey-form" action="https://formspree.io/your@email.com"
      method="POST">
    <div class="wrapper">
      <label id="name-label" class="question" for="name" name="name">* Identify yourself</label><br>
      <input id="name" class="answer" type="text" placeholder="They call me..." required><br>
    </div>

    <br>

    <div class="wrapper">
      <label id="email-label" class="question" for="email">* Email</label><br>
      <input id="email" class="answer" type="email" placeholder="your@email.here" required><br>
    </div>

    <br>

    <div class="wrapper">
      <label id="number-label" class="question" for="number">How old are you?</label><br>
      <input id="number" name="age" class="answer" type="number" min="0" max="117" placeholder="60"><br>
    </div>

    <br>

    <div class="wrapper">
      <span class="question">What is your purpose?</span><br>
      <select id="dropdown" class="answer">
        <option value="child">Child</option>
        <option value="studet">Student</option>
        <option value="military">Military</option>
        <option value="unemployed">Unemployed</option>
        <option value="self_employed">Self employed</option>
        <option value="some_professional">Some professional</option>
        <option value="butter">To pass butter</option>
        <option value="retired">Retired</option>
      </select><br>
    </div>

    <br>

    <div class="wrapper">
      <span class="question">Who is your favorite character?</span><br><br>
      <div class="answer">
        <input type="radio" name="fav_char" value="beth">Beth<br>
        <input type="radio" name="fav_char" value="birdperson">Birdperson<br>
        <input type="radio" name="fav_char" value="dr_xenon_bloom">Dr. Xenon Bloom<br>
        <input type="radio" name="fav_char" value="evil_morty">Evil Morty<br>
        <input type="radio" name="fav_char" value="fart">Fart<br>
        <input type="radio" name="fav_char" value="ice_t">Ice-T<br>
        <input type="radio" name="fav_char" value="jessica">Jessica<br>
        <input type="radio" name="fav_char" value="krombopulos_michael">Krombopulos Michael<br>
        <input type="radio" name="fav_char" value="morty">Morty<br>
        <input type="radio" name="fav_char" value="morty_jr">Morty Jr.<br>
        <input type="radio" name="fav_char" value="mr_poopybutthole">Mr. Poopybutthole<br>
        <input type="radio" name="fav_char" value="mr_meeseeks">Mr. Meeseeks<br>
        <input type="radio" name="fav_char" value="pencilvester">Pencilvester<br>
        <input type="radio" name="fav_char" value="pickle_rick">Pickle Rick<br>
        <input type="radio" name="fav_char" value="rick">Rick<br>
        <input type="radio" name="fav_char" value="scary_terry">Scary Terry<br>
        <input type="radio" name="fav_char" value="snuffles_snowball">Snuffles/Snowball<br>
        <input type="radio" name="fav_char" value="squanchy">Squanchy<br>
        <input type="radio" name="fav_char" value="summer">Summer<br>
        <input type="radio" name="fav_char" value="tammy" disabled>Tammy<br>
        <input type="radio" name="fav_char" value="tiny_rick">Tiny Rick<br>
        <input type="radio" name="fav_char" value="unity">Unity<br>
        <input type="radio" name="fav_char" value="zeep_xanflorp">Zeep Xanflorp<br>
      </div>
    </div>

    <br>

    <div class="wrapper">
      <span class="question">What is your favorite episode?</span><br>
      <div class="answer">
        <input type="radio" name="fav_ep" value="s1e1">Pilot<br>
        <input type="radio" name="fav_ep" value="s1e2">Lawnmower Dog<br>
        <input type="radio" name="fav_ep" value="s1e3">Anatomy Park<br>
        <input type="radio" name="fav_ep" value="s1e4">M. Night Shaym-Aliens!<br>
        <input type="radio" name="fav_ep" value="s1e5">Meeseeks and Destroy<br>
        <input type="radio" name="fav_ep" value="s1e6">Rick Potion #9<br>
        <input type="radio" name="fav_ep" value="s1e7">Raising Gazorpazorp<br>
        <input type="radio" name="fav_ep" value="s1e8">Rixty Minutes<br>
        <input type="radio" name="fav_ep" value="s1e9">Something Ricked This Way Comes<br>
        <input type="radio" name="fav_ep" value="s1e10">Close Rick-counters of the Rick Kind<br>
        <input type="radio" name="fav_ep" value="s1e11">Ricksy Business<br>
        <input type="radio" name="fav_ep" value="s2e1">A Rickle in Time<br>
        <input type="radio" name="fav_ep" value="s2e2">Mortynight Run<br>
        <input type="radio" name="fav_ep" value="s2e3">Auto Erotic Assimilation<br>
        <input type="radio" name="fav_ep" value="s2e4">Total Rickall<br>
        <input type="radio" name="fav_ep" value="s2e5">Get Schwifty<br>
        <input type="radio" name="fav_ep" value="s2e6">The Ricks Must Be Crazy<br>
        <input type="radio" name="fav_ep" value="s2e7">Big Trouble in Little Sanchez<br>
        <input type="radio" name="fav_ep" value="s2e8">Interdimentional Cable 2: Tempting Fate<br>
        <input type="radio" name="fav_ep" value="s2e9">Look Who's Purging Now<br>
        <input type="radio" name="fav_ep" value="s2e10">The Wedding Squanchers<br>
        <input type="radio" name="fav_ep" value="s3e1">The Rickshank Rickdemption<br>
      </div>
    </div>

    <br>

    <div class="wrapper">
      <span class="question">Best part about a plumbus?</span><br>
      <span class="answer">
        <input type="checkbox" name="plumbus" value="chumble">Chumble<br>
        <input type="checkbox" name="plumbus" value="dingle_bop">Dingle bop<br>
        <input type="checkbox" name="plumbus" value="fleeb">Fleeb<br>
        <input type="checkbox" name="plumbus" value="floob">Floob<br>
        <input type="checkbox" name="plumbus" value="frood_noops">Frood noops<br>
        <input type="checkbox" name="plumbus" value="grodus">Grodus<br>
        <input type="checkbox" name="plumbus" value="grumbles">Grumbles<br>
        <input type="checkbox" name="plumbus" value="grumbo">Grumbo<br>
      </span>
    </div>

    <br>

    <div class="wrapper">
      <span class="question">How many mega seeds can you hold?</span><br>
      <input class="answer" type="text"><br>
    </div>

    <br>

    <div class="wrapper">
      <span class="question">How would you describe Rick and Morty to a friend?</span><br>
      <textarea class="answer"></textarea><br>
    </div>

    <br>

    <center><button id="submit" type="submit" form="survey-form">Submit</button></center>
  </form>
  </body>
            
          
!
            
              body {
  position: static;
}

form {
  background-color: #CBCAD6;
  width: 60%;
  padding: 30px 40px 30px 40px;
  margin: auto;
}

img {
  width: 800px;
}

h1 {
  position: absolute;
  left: 0;
  right: 0;
  margin: auto;
  top: 320px;
  width: 800px;
  text-align: center;
  font-size: 50px;
  font-family: 'Bungee', sans-serif;
  color: #fff;
  text-transform: uppercase;
  background-color: #CBCAD6;
}

p {
  text-align: center;
  padding: 20px;
}

form, p, input, #dropdown, #submit {
  font-family: 'Source Code Pro', monospace;
}

input[type=text], input[type=email], input[type=number], #dropdown {
  height: 30px;
}

input[type=text], input[type=email], input[type=number], #dropdown, textarea {
  border: 0px;
  box-sizing: border-box;
  outline: none;
}

input[type=text]:focus, input[type=email]:focus, input[type=number]:focus, #dropdown:focus, textarea:focus {
  border: 1px solid #999;
}

#submit {
  background-color: #B2DAED;
  border: 3px solid #A8CB93;
  color: #fff;
  font-size: 28px;
  font-family: 'Bungee', sans-serif;
  text-transform: uppercase;
  padding: 10px 30px 10px 30px;
  margin: 20px 0px 0px 0px;
}

.container {
  position: relative;
}

.wrapper {
  display: flex;
  flex-flow: row nowrap;
  justify-content: center;
}

.question {
  color: #000;
  width: 200px;
  margin: 0px 0px 10px 0px;
  text-align: right;
}

.answer {
  width: 300px;
  margin: 0px 0px 0px 20px;
}

.item_1, .item_2, .item_3, {
  width: 300px;
  margin: 0px 30px 10px 30px;
}
            
          
!
            
              $(document).ready(function () {

  var isMobile = /Android|iPhone|iPad|iPod|BlackBerry|Opera Mini/i.test(navigator.userAgent);

  if (isMobile) {
    $("img").css ({
      "width": "300px;"
    });
    $("h1").css ({
      "width": "300px;"
    });
    $("h1").css({
      "font-size": "24px;"
    });
  }

  // sets custom HTML5 validity text
  var name = document.querySelector('input[id="name"]');
  var email = document.querySelector('input[id="email"]');

  $(name).on("invalid", function () {
    this.setCustomValidity("BOO, NOT COOL.\nPlease enter your name.");
  });

  $(name).on("input", function () {
    this.setCustomValidity("");
  });

  $(email).on("invalid", function () {
    this.setCustomValidity("DISQUALIFIED.\nPlease format your email correctly.");
  });

  $(email).on("input", function () {
    this.setCustomValidity("");
  });

});
            
          
!
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