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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

              
                <title id="book-recommendations">Book-Recommendations</title>
<div class="background">
  <div class="blur">
    <header class="container-one thin-black-border">
      <h1 id="title">Find your next read!</h1>
      <p id="description" class="white-text"><strong>Tell us your reading preferences, and we will give you suggestions for what to read next.</strong></p>
    </header>
    <form id="survey-form" action="_blank" class="smoky-background thin-black-border">
      <div class="survey-question">
        <p><label for="name" id="name-label">Please enter your name.
          </label></p>
        <input id="name" required type="text" placeholder="Tina Belcher, e.g." class="center-block">
      </div>
      <div class="survey-question">
        <p><label for="email" id="email-label">Please list your email.</label></p>
        <input id="email" required type="email" placeholder="ItsMe@example.com" class="center-block">
      </div>
      <div class="survey-question">
        <p><label for="number" id="number-label">How many book suggestions would you like today? (up to 10)</label></p>
      </div>
      <input id="number" type="number" required value="" min="1" max="10" step="1" placeholder="0" class="center-block">
      <div class="survey-question">
        <p>What is your preferred format for reading?</p>
      </div>
      <div class="format">
        <select id="dropdown" name="format" class="center-block">
          <option value="placeholder">Select a format</option>
          <option value="book">Book</option>
          <option value="ebook">E-Book</option>
          <option value="audiobook">Audiobook
          </option>
          <option value="braille">Braille</option>
          <option value="large-print">Large Print</option>
        </select>
      </div>
      <div class="survey-question">
        <p>What are your favorite genres to read?</p>
      </div>
      <div class="genre">
        <div class="even-columns">
          <div class="col">
            <label for="biography"><input id="biography" type="radio" name="genre" value="biography"> Biography</label>
            <label for="classics"><input id="classics" type="radio" name="genre" value="classics"> Classics</label>
            <label for="contemporary"><input id="contemporary" type="radio" name="genre" value="contemporary"> Contemporary</label>
            <label for="crime"><input id="crime" type="radio" name="genre" value="crime"> Crime</label>
            <label for="erotica"><input id="erotica" type="radio" name="genre" value="erotica"> Erotica</label>
          </div>
          <div class="col">
            <label for="essays"><input id="essays" type="radio" name="genre" value="essays"> Essays</label>
            <label for="fantasy"><input id="fantasy" type="radio" name="genre" value="fantasy"> Fantasy</label>
            <label for="historical"><input id="historical" type="radio" name="genre" value="historical"> Historical</label>
            <label for="horror"><input id="horror" type="radio" name="genre" value="horror"> Horror</label>
            <label for="memoir"><input id="memoir" type="radio" name="genre" value="memoir"> Memoir</label>
          </div>
          <div class="col">
            <label for="mystery"><input id="mystery" type="radio" name="genre" value="mystery"> Mystery</label>
            <label for="poetry"><input id="poetry" type="radio" name="genre" value="poetry"> Poetry</label>
            <label for="romance"><input id="romance" type="radio" name="genre" value="romance"> Romance</label>
            <label for="science-fiction"><input id="science-fiction" type="radio" name="genre" value="science-fiction"> Science-Fiction</label>
            <label for="thriller"><input id="thriller" type="radio" name="genre" value="thriller"> Thriller</label>
          </div>
        </div>
      </div>
      <div class="survey-question">
        <p>What mood would you like potential books to have?</p>
      </div>
      <div class="mood">
        <div class="even-columns">
          <div class="col">
          <label for="adventurous"><input id="adventurous" type="checkbox" name="mood" value="adventurous"> Adventurous</label>
            <label for="challenging"><input id="challenging" type="checkbox" name="mood" value="challenging"> Challenging</label>
            <label for="dark"><input id="dark" type="checkbox" name="mood" value="dark"> Dark</label>
            <label for="emotional"><input id="emotional" type="checkbox" name="mood" value="emotional"> Emotional</label>
          </div>
          <div class="col">
            <label for="funny"><input id="funny" type="checkbox" name="mood" value="funny"> Funny</label>
            <label for="hopeful"><input id="hopeful" type="checkbox" name="mood" value="hopeful"> Hopeful</label>
            <label for="informative"><input id="informative" type="checkbox" name="mood" value="informative"> Informative</label>
            <label for="inspiring"><input id="inspiring" type="checkbox" name="mood" value="inspiring"> Inspiring</label>
          </div>
          <div class="col">
            <label for="lighthearted"><input id="lighthearted" type="checkbox" name="mood" value="lighthearted"> Lighthearted</label>
            <label for="mysterious"><input id="mysterious" type="checkbox" name="mood" value="mysterious"> Mysterious</label>
            <label for="reflective"><input id="reflective" type="checkbox" name="mood" value="reflective"> Reflective</label>
            <label for="relaxing"><input id="relaxing" type="checkbox" name="mood" value="relaxing"> Relaxing</label>
          </div>
          <div class="col">
            <label for="sad"><input id="sad" type="checkbox" name="mood" value="sad"> Sad</label>
          </div>
        </div>
      </div>
      <div class="survey-question">
        <p>What are some of your favorite books and authors?</p><textarea id="favorites" name="favorites" rows="4" cols="60"></textarea>
      </div>
      <div id="submit-form">
        <button id="submit" type="submit" class="center-block grab">Submit</button>
      </div>
    </form>
  </div>
</div>
              
            
!

CSS

              
                .background {
  background-image: url("https://lh3.googleusercontent.com/mkYnyE73j3Utp_HEizb37QyrjYF35kVrvxN0D7pn5B_3qFwycZP3zkGA9W78RSXE4pAIXB4Av0zTC-JYZkyZm1X_Rs3nyGFSB3DKh4Vl_A9VoAc3ZNeJaYSfrpi0ixDiE_eTpibyb8A=w2400");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  height: 100%;
  width: 100%;
}

.blur {
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(4px);
  height: 100%;
  width: 100%;
}

h1 {
  font-family: sans-serif;
  text-align: center;
  color: #ffffff;
  text-shadow: 2px 2px 6px #000;
}

p {
  font-size: 16px;
  font-family: sans-serif;
  text-align: center;
  color: #ffffff;
  text-shadow: 2px 2px 8px #000;
}

.survey-question {
  color: white;
  text-align: center;
  text-shadow: 2px 2px 8px #000;
}

.center-block {
  display: block;
  margin: auto;
}

.genre {
  display: flex;
  justify-content: center;
  color: white;
  max-width: 100%;
  height: auto;
  margin: 0px 0px 20px 0px;
}

.mood {
  display: flex;
  justify-content: center;
  color: white;
  max-width: 100%;
  height: auto;
  margin: 0px 0px 20px 0px;
}

textarea {
  max-width: 100%;
  height: auto;
  margin: 5px 5px 25px 5px;
}

button {
  color: #fff;
  background-color: rgba(0, 0, 0, 0.4);
  border-radius: 5px;
  padding: 3px 3px 3px 3px;
}

button:hover {
  animation-name: background-color;
  animation-duration: 2000ms;
}

@keyframes background-color {
  100% {
    background-color: rgba(0, 245, 0, 0.3);
  }
}

.grab {
  cursor: grab;
}

.container-one {
  background: rgba(0, 0, 0, 0.43);
  padding: 5px;
  margin: 10px 100px 10px 100px;
}

.smoky-background {
  background-color: rgba(0, 0, 0, 0.43);
  padding: 20px;
  margin: 0px 100px 0px 100px;
}

.thin-black-border {
  border-color: black;
  border-width: 1px;
  border-style: solid;
  border-radius: 10px;
}

@media (max-width: 100px) {
  smoky-background: {
    margin: 0px 10px 0px 10px;
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console