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.

              <div class="hidden-xs hidden-sm hidden-md">"Large size"</div>
<div class="hidden-xs hidden-sm hidden-lg">"Medium size"</div>
<div class="hidden-xs hidden-md hidden-lg">"Small size"</div>
<div class="hidden-sm hidden-md hidden-lg">"Extra small size"</div>

<h2>CSS bug caused by single pixel width gaps between media queries at non-100% zoom sizes in Firefox, Edge and IE.</h2>
<h3>Demonstration using Bootstrap 3.6.6</h3>

<p>18th February 2016</p>

<p>Open this pen in Edge or IE and select a zoom level other than 100%. If you are on a Windows 7/8/10 machine with a 1920x1080 screen, by default your OS's zoom will be set to 125%, and therefore so will Edge and IE for visibility reasons.</p>

<p>Open this pen in Firefox. If you are on a Windows 7/8/10 machine with a 1920x1080 screen, by default your OS's zoom will be set to 125%, which Firefox then takes to be it's "100%" zoom. On computers like this, Firefox's 100% zoom setting will appear larger than other browsers for the same visibility reasons, while actually displaying web pages at 125% zoom.</p>

<p>The above cases causes certain browser window sizes to report decimal page widths. These decimal page widths can mean a browser may report a width of 991.5px wide. In Bootstrap for example, this puts the browser width between two sets of breakpoint rules, as medium sized screens are defined as 991px wide and fewer, and large sized screens are defined as 992px and greater. These gaps will cause all four of the divs above to display at the same time, which should not happen.</p>

<p>This issues isn't only demonstrated by Bootstrap - any CSS library or site using "max VALUE-1 px" and "min VALUE" for two sets of media queries may exhibit these described problems.</p>

<p>One approach for avoiding these problems is to only ever use min or max media queries, as these don't result in gaps exploited by decimla page widths, however this comes with a loss of flexibility used extensively by CSS scaffolding systems like Bootstrap.</p>

<p>Webkit browsers (Safari and Chrome) appear to internally round the page width before applying rules in media queries, so they don't have any of these issues.</p>
              div, p, h2, h3 {
  max-width: 600px;
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;

div {
  font-size: 20px;
  font-style: italic;
  font-size: 60px;
🕑 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 ..................