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

Details

Privacy

Go PRO Window blinds lowered to protect code. Code Editor with window blinds (raised) and a light blub turned on.

Keep it secret; keep it safe.

Private Pens are hidden everywhere on CodePen, except to you. You can still share them and other people can see them, they just can't find them through searching or browsing.

Upgrade to PRO

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.

Template

Make Template?

Templates are Pens that can be used to start other Pens quickly from the create menu. The new Pen will copy all the code and settings from the template and make a new Pen (that is not a fork). You can view all of your templates, or learn more in the documentation.

Template URL

Any Pen can act as a template (even if you don't flip the toggle above) with a special URL you can use yourself or share with others. Here's this Pen's template URL:

Screenshot

Screenshots of Pens are shown in mobile browsers, RSS feeds, to users who chose images instead of iframes, and in social media sharing.

This Pen is using the default Screenshot, generated by CodePen. Upgrade to PRO to upload your own thumbnail that will be displayed on previews of this pen throughout the site and when sharing to social media.

Upgrade to PRO

HTML

              
                <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal">
  I'm at the top, so I'm fine
</button>



<p>
Pulvinar rutrum nibh class vel ac? Sit nec volutpat pulvinar natoque. In et fames et tempus curae; ipsum netus elementum lectus sit dui! Nam mattis feugiat id! Suscipit magna faucibus montes vel consectetur sem dapibus. Euismod libero ipsum faucibus tristique morbi aptent dolor tellus facilisis feugiat sagittis nam. Dapibus nostra nam netus duis netus in urna eu. Commodo hac taciti sed faucibus cubilia elit eleifend faucibus neque eros? Nisi erat arcu eros leo sit posuere.
</p>
<p>
Sociis nec eu turpis malesuada pharetra pretium consequat purus nam purus? Egestas eget integer nostra potenti netus erat parturient. Vulputate sit augue ad nisl! Semper curae; augue sodales montes parturient. Neque purus nam id hac phasellus augue risus egestas ultricies aliquet. Interdum cras quam cubilia facilisis; a ligula fermentum iaculis justo a nostra? Sollicitudin natoque tortor quisque himenaeos habitasse vitae orci porttitor. Habitasse quisque lorem ornare lectus rutrum elit sociis tortor! Parturient suspendisse eros mi fringilla auctor.
</p>
<p>
Proin nisi dignissim dui. Mattis malesuada diam netus proin proin. Parturient porta vehicula ridiculus. Montes lacus pellentesque blandit convallis class vitae eget! Semper nostra aliquet torquent ipsum morbi aliquam massa libero metus. In hendrerit sagittis eros aptent gravida nibh duis? Auctor a turpis in tincidunt ornare nulla dictumst ante ullamcorper magnis. Praesent dui scelerisque tellus erat.
</p>
<p>
Posuere ornare parturient habitasse turpis dapibus id malesuada integer, rutrum vel. Aliquet ac turpis nec laoreet nibh per sed. Hac in iaculis eget amet nulla dictumst fusce proin volutpat tempor. Tempus id metus primis suscipit diam parturient consectetur mattis consectetur conubia. Feugiat taciti sapien odio taciti eros mauris vulputate et nibh arcu? Gravida magna, non tempus. Aliquet ullamcorper imperdiet phasellus magna curabitur morbi montes elementum lobortis vulputate fames. Netus ligula commodo sociosqu justo dapibus magnis dolor natoque cursus laoreet. Libero consectetur vehicula hac erat vulputate pretium.
</p>
<p>
Eleifend amet hac cubilia dis vitae ultrices proin tempus potenti suscipit nisl vehicula. Pulvinar nunc etiam nostra viverra nostra vestibulum litora velit dignissim morbi commodo. Senectus lacus ullamcorper dolor venenatis tellus condimentum. Parturient molestie sociosqu lobortis nam convallis ultrices diam, varius ullamcorper augue. Netus fermentum et tincidunt venenatis class nibh feugiat.
</p>



<!-- Button trigger modal -->
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal">
  I'm further down, the calendar will be wrong in IE11/Edge
</button>

<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel">Modal title</h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
        <div class="input-group">
          <input id="datepicker" type="text" class="form-control" />          
        </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
      </div>
    </div>
  </div>
</div>
              
            
!

CSS

              
                .ui-datepicker { z-index: 10000 !important;}
              
            
!

JS

              
                $(document).ready(function() { 
  $( "#datepicker" ).datepicker();
});
              
            
!
999px
If you get tired, be like an AJAX request and REST.

Console