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.

            
              <div class="wrapper mx-auto d-block" style="width:700px;">
  <div class="header">
    <h1 style="text-align:center;font:48px amatic sc;margin:60px 0 40px;">A Quote a Day</h1>
    <p style="margin:0 0 60px;">Here is a random quote generator that I made as part of my Front-end Development Certificate from Free Code Camp.</p>
  </div>
  <div class="quote-box mx-auto d-block" style="min-height:200px; width:400px; border:solid black; margin:60px 0 40px;border-radius:18px;background:#F5F5F5;">
	  <div class="quote"></div>
    <div class="mx-auto d-block footer" style="height:50px;width:77px;margin:80px 0 40px;">
      <a class="share-button mx-auto d-block btn btn-primary" target="_blank" href="">Tweet</a>
    </div>
  </div>
  <button class="quote-button btn btn-primary mx-auto d-block" style="margin: 0 0 40px;position:absolute 0px">Next quote!</button>
  <p class="mx-auto d-block" style="width:425px;">Care to see what else I'm learning? <a href="https://www.freecodecamp.com/briannaeason" target="_blank">Here's my fCC profile.</a></p>
</div>
            
          
!
            
              body {
  background:#ADEAEA;
  font:18px amatic sc;
}

.quote {
	font:24px pacifico;
	text-align:center;
	padding:20px;
}

.share-button {
	font: 18px amatic sc;
}

.quote-button {
	font: 18px amatic sc;
}
            
          
!
            
              $.ajaxSetup({
    cache:false
});

	$.getJSON("https://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1&callback=", function(a) {
	  $(".quote").html(a[0].content + "<p>&mdash; " + a[0].title + "</p>");
	  $(".share-button").attr("href", twitterBaseURL + $(a[0].content).text() + " - " + a[0].title);
	});

$(".quote-button").click(function() {

	$.getJSON("https://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1&callback=", function(a) {
	  $(".quote").html(a[0].content + "<p>&mdash; " + a[0].title + "</p>");
	  $(".share-button").attr("href", twitterBaseURL + $(a[0].content).text() + " - " + a[0].title);	
	});
	
});

var twitterBaseURL = "https://twitter.com/intent/tweet?text=";

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

Console