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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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 = "container">
  <div class = "row">
    <h1>Motivational Quotes!</h1>
    <h2>Here are some motivational quotes found online to keep you motivated! Enjoy!</h2>
  </div> 
  <div class = "row quote">
    <div class = "col-xs-20 message"> 
      The message goes here.
    </div>
    <div class = "col-xs-14 who">
    </div>
    <a href = "#"><button id = "twitterButton" class = "button2">
      Tweet!
    </button>
  </div>
  <div class = "row">
    <div class = "col-xs-14">
      <button id = "getMessage" class = "button">
        Generate Quote
      </button>
      </a>  
    </div>
  </div>
</div>

              
            
!

CSS

              
                body {
  text-align: center;
  background-image: url("http://wallpaper-gallery.net/images/landscape/landscape-3.png");
  background-size: 1980px 900px;
  background-repeat: no-repeat;
}

.button {
  height: 50px;
  width: 400px;
  margin: 20px auto;
  color: rgba(0,0,0,1); 
  font-size: 20px;
  border-radius: 25px;
  box-shadow: -5px 5px 10px;       rgba(100,100,100,.8);
}

.button2 {
  height: 25px;
  width: 200px;
  margin: 20px auto;
  color: rgba(1,0,0,1); 
  font-size: 20px;
  border-radius: 10px;
  box-shadow: -5px 5px 10px;       rgba(100,100,100,.8);
  background-color: #F70D2B;
}

.quote {
  font-family: serif;
  font-size: 1.5em;
  width: 700px;
  height: auto;
  margin: 0 auto;
  padding: 20px;
  border-radius: 15px;
  box-shadow: -5px 7px 5px;
  color: #000;
  rgba(100,100,100,.8);
}

.who {
  font-style: italic;
}


              
            
!

JS

              
                $(document).ready(function() {
	generate();

  function generate(){ var theQuotes = ["Only I can change my life. No one can do it for me.+-Carol Burnett","Life is 10% what happens to you and 90% how you react to it.+-Charles R. Swindoll","Good, better, best. Never Let it rest. 'Til your good is better and your better is best.+-St. Jerome","Our greatest weakness lies in giving up. The most certain way to succeed is always to try just one more time.+-Thomas A. Edison","Optimism is the faith that leads to achievement. Nothing can be done without hope and confidence.+-Helen Keller","It always seems impossible until it's done.+-Nelson Mandela","Always do your best. What you plant now, you will harvest later.+-Og Mandino", "We aim above the mark to hit the target.+-Ralph Waldo Emerson", "With the new day comes new strength and new thoughts.+-Eleanor Roosevelt", "Setting goals is the first step in turning the invisible into the visible.+-Tony Robbins", "It does not matter how slowly you go as long as you do not stop.+-Confucius", "The past cannot be changed. The future is yet in your power.+-Unknown" ];
                      
var randomQuote = theQuotes[Math.floor(Math.random()*theQuotes.length)]; 
var quoteAuthor=randomQuote.split("+"); 
$('.message').text(quoteAuthor[0]); 
$('.who').text(quoteAuthor[1]);
                     }                      
$('#twitterButton').click(function() {
  window.open('https://twitter.com/intent/tweet?text=' + $('message').text() + " " + $('who').text());       
});
$(".button").on( "click", function() { generate(); 
  });
});
              
            
!
999px

Console