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


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


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.



  <title>Random Star Wars Quote Generator</title>
  <link href=',700' rel='stylesheet' type='text/css'>

  <section class="container-fluid">
    <h1>Random Star Wars Quote
    <div class="jumbotron">
      <p id="quote">A long time ago in a galaxy far,far away...</p>
      <p id="author"></p>
      <a href="#"><button type="button" class="btn" id="quote-btn">New
      <a href="#"><button type="button" class="btn" id="tweet-btn">Tweet It!</button></a>



                body {
  background-image: url('');
  background-repeat: no-repeat;
  background-size: cover;

h1 {
  text-align: center;
  margin-top: 50px;
  margin-bottom: 50px;
  font-size: 80px;
  font-family: 'Droid Sans', sans-serif;

.jumbotron {
  position: relative;
  height: 300px;
  width: 750px;
  margin: 0 auto;
  background-color: #ffdf80;
  opacity: 0.6;
  filter: alpha(opacity=60);

#quote {
  margin-bottom: 20px;
  font-size: 30px;
  margin: 0 auto;

#author {
  text-align: right;
  margin-right: 50px;

.btn {
  position: relative;
  bottom: 0px;
  font-size: 26px;
  margin-left: 20px;
  font-family: 'Droid Sans', sans-serif;


                var quotes = [{
  quote: "Fear is the path to the dark side. Fear leads to anger. Anger leads to hate. Hate leads to suffering.",
  name: "-Yoda"
}, {
  quote: "The ability to speak does not make you intelligent.",
  name: "-Qui-Gon Jinn"
}, {
  quote: "Remember...the Force will be with you always.",
  name: "-Obi-Wan Kenobi"
}, {
  quote: "The Force is strong with this one.",
  name: "-Darth Vader"
}, {
  quote: "Sometimes we must let go of our pride and do what is requested of us.",
  name: "-Padme Amidala"
}, {
  quote: "Do or do not. There is no try.",
  name: "-Yoda"
}, {
  quote: "I am a Jedi, like my father before me.",
  name: "-Luke Skywalker"
}, {
  quote: "You have your moments. Not many of them, but you have them.",
  name: "-Princess Leia"
}, {
  quote: "If you want to be successful in a particular field, perseverance is one of the key qualities.",
  name: "-George Lucas"
}, {
  quote: "Always pass on what you have learned.",
  name: "-Yoda"
}, {
  quote: "Your focus determines your reality.",
  name: "-Qui-Gon Jinn"
}, {
  quote: "You can't stop change any more than you can stop the suns from setting.",
  name: "-Shmi Skywalker"
}, {
  quote: "Someday I will be the most powerful Jedi ever.",
  name: "-Anakin Skywalker"
}, {
  quote: "I sense great fear in you, Skywalker. You have hate. You have anger. But you don't use them.",
  name: "-Count Dooku"

$(document).ready(function() {

  $('#quote-btn').click(function() {
    var quotesLength = quotes.length;
    var rand = Math.floor(Math.random() * quotesLength);

  $('#tweet-btn').click(function() {'' + $('#quote').text() + " " + $('#author').text());