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.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

              <article class="post">
  <h1>Responsive Footnotes</h1>
  <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Expedita atque cum nihil nostrum voluptatibus dolor possimus totam delectus rerum harum. Nisi perspiciatis neque modi harum quidem laudantium earum possimus. Fugit dolorem quam doloremque tempore sequi nesciunt id sint culpa harum maxime quidem quibusdam et dolore eum maiores expedita sunt laboriosam quos illo ratione autem soluta veniam.<sup class="post-marker"><a href="#note:1">1</a></sup> Nostrum architecto omnis quod sunt ratione mollitia cupiditate ipsa tempore!</p>
  <p>Architecto blanditiis hic doloribus amet ullam molestiae necessitatibus iure dolor et adipisci possimus id omnis error optio est pariatur porro sapiente eligendi maiores eaque voluptas veritatis expedita sed aliquam consectetur? Expedita itaque quaerat veniam pariatur! Officia adipisci beatae unde quaerat quisquam eveniet est dolorem voluptatem numquam animi.</p>
  <p>Perspiciatis atque voluptas voluptatum eligendi minima officia tenetur. Qui asperiores animi pariatur sapiente error velit eius veritatis nisi blanditiis ratione iure vero hic nesciunt maiores sint ab provident iste neque aliquid impedit delectus eaque voluptatum sequi tempore reprehenderit nulla accusantium. Voluptas porro temporibus quisquam officiis neque tempore sunt maiores iste quos in. Ipsum eveniet doloremque voluptas perferendis veritatis! Ullam amet quam totam commodi consectetur et ducimus.<sup class="post-marker"><a href="#note:2">2</a></sup></p>
  <p>Quasi animi ex error recusandae dolor rerum saepe numquam veritatis ducimus pariatur aliquam praesentium quaerat alias sequi qui aperiam ad inventore quibusdam fuga voluptates consectetur minus labore?<sup class="post-marker"><a href="#note:3">3</a></sup> Totam eaque adipisci dolorum delectus magnam inventore praesentium hic perferendis odit amet maxime nesciunt nisi. Sit a asperiores error pariatur iste nam aut repellendus at ipsa nulla earum distinctio hic quisquam aperiam laudantium delectus placeat voluptatum inventore obcaecati possimus! Magni veniam praesentium natus laboriosam fuga itaque accusantium sequi labore expedita voluptate ullam fugiat nobis non iusto ex nihil.</p>
  <ol class="post-footnotes">
    <li id="note:1">Read the tutorial <a href="http://johndjameson.com/blog/responsive-sidenotes/">here</a>.</li>
    <li id="note:2">Saepe nisi dolor ex qui et iusto molestiae?</li>
    <li id="note:3">Voluptas ex quam blanditiis quia placeat in ut maiores illum fuga itaque quos fugiat eos mollitia cum neque ipsam.</li>
              body {
  line-height: 1.5;
  padding: 0 1.5rem;
a {
  color: blue;  
p {
  margin-bottom: 1.5rem;
  margin-top: 0;
.post {
  margin: 0 auto;
  max-width: 30em;
.post-marker::before {
  content: "\00a0"; /* A non-breaking space glues a marker to its target word. */
  font-size: 0.25em;
.post-marker a {
  font-weight: bold;
  letter-spacing: 1px;
  text-decoration: none;
.post-marker a::before {
  content: "[";  
.post-marker a::after {
  content: "]";  
.post-subject {
  position: relative;  
.post-sidenote {
  box-sizing: border-box;
  color: #999;
  display: none;
  font-style: italic;
  left: 100%;
  padding-left: 1.5rem;
  position: absolute;
  top: 0;
  width: 33.333333%;
.post-footnotes {
  border-top: 1px solid #999;
  color: #999;
  padding-top: 1.5rem;

@media screen and (min-width: 50em) {
  .post.has-sidenotes .post-marker {
    display: none;
  .post.has-sidenotes .post-sidenote {
    display: block;
  .post.has-sidenotes .post-footnotes {  
    display: none;

              var $post = $('.post'),
    $markers = $('.post-marker'),
    $footnotes = $('.post-footnotes');

function createSidenotes() {
    var $footnoteArray = $footnotes.children();

    $markers.parent().wrap("<div class='post-subject'></div>");

    for (var i = 0, len = $markers.length; i < len; i++) {
            // role='complementary' provided for ARIA support
            "<aside class='post-sidenote' role='complementary'><p>"
            + $($footnoteArray[i]).html()
            + "</p></aside>"

🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................