cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

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.

            
              <link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<body>
  <div class="container-fluid quote-gen">
    <h1>MORRISSEY QUOTE GENERATOR</h1>
    <button class="btn  btn-lg btn-dark" id= "generate" onclick="morrisseyGen()">GENERATE QUOTE</button>
    <p id= "newQuote"></p>
    
    <div id="container"></div>  
</a>
    <p id= "footer"> background image courtesy "https://cdn.americansongwriter.com/wp-content/uploads/2013/06/nAm8WsadGLX-5ZBdH9Krh-xOfsnssIB4P7jhe-vZkDA.jpg?b87883"</p>
  </div>
  <div>
  </div>
</body>
            
          
!
            
              @import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,900);

body {
  background: 
    linear-gradient(
      rgba(0, 0, 0, 0.5),
      rgba(0, 0, 0, 0.5)
    ),
    

    url(https://cdn.americansongwriter.com/wp-content/uploads/2013/06/nAm8WsadGLX-5ZBdH9Krh-xOfsnssIB4P7jhe-vZkDA.jpg?b87883)no-repeat center center fixed;
  background-size: cover;
  
  font-family: 'Source Sans Pro', sans-serif;
}

.quote-gen {

  color: white;
  text-align: center;
}

#newQuote{
  margin-top: 60px;
  font-size : 46pt;
}

#footer {
  margin-top: 90%;
}


.btn-dark{
  background-color: gray;
  outline: gray;
  color: white;
  margin-top: 20px;
}
.btn-dark:hover {
  color: #fff;
  background: rgba(0, 0, 0, 0.4);
  border-color: white;
}

            
          
!
            
              window.twttr = (function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0],
    t = window.twttr || {};
  if (d.getElementById(id)) return t;
  js = d.createElement(s);
  js.id = id;
  js.src = "https://platform.twitter.com/widgets.js";
  fjs.parentNode.insertBefore(js, fjs);
 
  t._e = [];
  t.ready = function(f) {
    t._e.push(f);
  };
 
  return t;
}(document, "script", "twitter-wjs"));


var quotes = ["When they bury me in a church and chuck earth on my grave, I'd like the words 'Well, at least he tried' engraved on my tombstone.", "Artists aren't really people. I'm actually 40 per cent papier mache.","Life would be so colourful if only I had a drink problem.","Long hair is an unpardonable offense which should be punishable by death.","I am capable of looking on the bright side - I just don’t do it very often.","Unfortunately, I am not homosexual... In technical fact, I am humasexual. I am attracted to humans. But, of course, not many.","What's the first thing I do when I wake up in the morning? Wish I hadn't.","Music is like a drug, but there are no rehabilitation centres.","All human activity is fruitless when pitted against the girls and boys singing on pop television, for they have found the answer as the rest of us search for the question. I will sing, too. If not, I will have to die.","When I'm lying in my bed I think about life and I think about death and neither one particularly appeals to me.","Don't talk to me about people who are 'nice' cause I have spent my whole life in ruins because of people who are 'nice'.","I do maintain that if your hair is wrong, your entire life is wrong.","Age shouldn’t affect you. You’re either marvellous or you’re boring, regardless of your age.","I do think it's possible to go through life and never fall in love, or find someone who loves you.","Doing nothing gives me great pleasure. And believe me, I succeed wonderfully in it","I've never intended to be controversial but it's very easy to be controversial in pop music because nobody ever is.","If Jamie Oliver is so certain that flesh-food is tasty then why doesn't he stick one of his children in a microwave."
]

function morrisseyGen(a) {
  
  var randNum = Math.floor((Math.random() * 16) + 1);
  var quote = quotes[randNum].concat(" - Morrissey");
 
 
document.getElementById("newQuote").innerHTML=quote;

twttr.widgets.createShareButton(
  'https://codepen.io/jlcampbell/pen/WrKWoB',
  document.getElementById('container'),
  {
    text: quote
  }
);  
  
}











            
          
!
999px
Loading ..................

Console