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

+ add another resource


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


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.


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.


  rel="stylesheet" href="">
<div id="quote-box" class="jumbotron text-center">
<section id="wastext"><h1><span id="text">"If you go flying back through time, and you see somebody else flying forward into the future, it's probably best to avoid eye contact."</span></h1>
<div><p1 id="style-author"><span id="author">Jack Handey</span></p1></div>
     <section id="socialMedia" class="buttons">
        title="Tweet this quote!"
        <i class="fa fa-twitter"></i>
        title="Post this quote on tumblr!"
        <i class="fa fa-tumblr"></i>
  <button id="new-quote" class="btn btn-primary" type="submit">New Quote</button>


                * {
  margin: 0;
  padding: 0;
  list-style: none;
  vertical-align: baseline;
html, body { overflow-x: hidden; }
body {
  color: black;
  font-family: 'Caveat', cursive;
  font-weight: 900;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: rgba(89, 127, 165, 0.5);
#quote-box {
  position: relative;
  display: table;
  height: 80vh;
  width: 80vw;
 border: 4px solid black;
  margin: auto;
  padding: 15px;
  background-image: url("");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center; 

#style-author {
  float: right;
  padding: 5px;
  position: relative;
  text-align: center;
  background-color: rgba(242, 241, 237,.6);
  width: 25%;
  border-radius: 1rem;}
#wastext {
  position: relative;
  font-size: 1.2rem;
  padding: 10px;
  text-align: center;
  margin: auto;
  background-color: rgba(242, 241, 237,.5);
  width: 90%;
  border-radius: 1rem;}

.btn {
  padding: 10px;
  font-size: 2rem;
  border-radius: 1rem;
.buttons {
 width: 45px;
 display: block;
  border-radius: 1rem;
    .button {
      margin: 5px;
      height: 40%;
      border: none;
      border-radius: 5px;
      color: #fff;
      background-color: #333;
      outline: none;
      font-size: 0.85em;
      padding: 8px 18px 6px 18px;
      opacity: 1;
      cursor: pointer;
      &:hover {
        opacity: 0.9;

#new-quote {
  position: absolute;
  bottom: 11px;
  right: 11px;
  opacity: .8;
  cursor: pointer;
#socialMedia {
  width: auto;
  display: flex;
  position: absolute;
  bottom: 11px;
  left: 11px;
  background-color: white;
  opacity: .8;


                let wallPaper = ["#1681ab", 
let background=["url(", "url(", "url(", "url(", "url(", "url(",
"url(", "url("];
let quoteText = ["It takes a big man to cry, but it takes a bigger man to laugh at that man.", "If I ever get real rich, I hope I'm not real mean to poor people, like I am now.", "If trees could scream, would we be so cavalier about cutting them down? We might, if they screamed all the time, for no good reason.", "Sometimes I think you have to march right in and demand your rights, even if you don\'t know what your rights are, or who the person is you\'re talking to. Then on the way out, slam the door.",  
"I can picture in my mind a world without war, a world without hate. And I can picture us attacking that world, because they\'d never expect it.",
"Before you criticize someone, you should walk a mile in their shoes. That way when you criticize them, you are a mile away from them and you have their shoes.", 
"To me, boxing is like a ballet, except there's no music, no choreography, and the dancers hit each other.", 
"Sometimes when I reflect back on all the beer I drink I feel ashamed. Then I look into the glass and think about the workers in the brewery and all of their hopes and dreams. If I didn\'t drink this beer, they might be out of work and their dreams would be shattered. Then I say to myself, It is better that I drink this beer and let their dreams come true than to be selfish and worry about my liver.",
 "Do you know what happens when you slice a golf ball in half? Someone gets mad at you. I found this out the hard way.", 
"I hope if dogs ever take over the world, and they chose a king, they don\'t just go by size, because I bet there are some Chihuahuas with some good ideas."];
//the compliance array has progressively divergent names. These are all Jack Handey quotes
let compliance = ["Jack Handey ", "Jack Handey", "Mr J.Handey", "Jack Handey JR", "Jack Handey", "Jack Handey", "Jack", "JP.Handey", "Gandhi", "Daryl"];
const newQuote = document.getElementById("new-quote");
const myText = document.getElementById("text");
const myBG = document.getElementById("quote-box");
const myAuthor = document.getElementById("author");
const myWall = document.querySelector("body");

const quoteChanger = function() {
  let index = Math.floor(Math.random() * 10);
  let Wall = wallPaper[index];
  let BG = background[index];
  let data = quoteText[index];
  let dataAuthor = compliance[index]; = Wall; = BG;
  myText.innerHTML = data;
  myAuthor.innerHTML = dataAuthor;
newQuote.addEventListener('click', quoteChanger);

//let backgrounds = ["walk","run","fly"];
//let urlA = "url(";
//let urlB = ")";
//let scenicPics = background.forEach(iterate(el,i) => let urlA + el[i] + urlB);

//function theCat(arr) {
 // let strArr = [];
//  let urlB = ")";
//  let urlA = "url(";
//  for (let i = 0; i < strArr.length; i++) {
//    return [urlA, arr[i], urlB].join("");
//  } 
//let backgrounds = ["walk","run","fly"];