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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

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.

HTML

              
                <div class="container clearfix">
  <div class="column-1">
    <h1>Overriding CSS Values</h1>
  </div>
</div>

<div class="container clearfix">
  <div class="column-1">
    <h2>Media Query to Override 3-to-1 Column Break to be 3-to-2 Columns for Small Devices</h2>
  </div>
</div>

<div class="fusion-body clearfix">
  <div class="products">
    <ul>
      <li><h2>Product A</h2>Lorem ipsum dolor amet mustache microdosing drinking vinegar hammock coloring book schlitz, lomo actually gastropub. Live-edge DIY shabby chic af street art hexagon fam kogi cardigan cronut yr single-origin coffee butcher pug. Beard chillwave ugh seitan. Cardigan messenger bag ennui jianbing cold-pressed brooklyn hell of. Small batch 3 wolf moon man braid, retro XOXO pok pok YOLO live-edge organic cold-pressed church-key photo booth stumptown. Listicle actually tattooed, vice truffaut cardigan skateboard leggings +1 lo-fi art party. Blue bottle kombucha woke af occupy, lumbersexual cold-pressed four dollar toast craft beer flannel cronut food truck.</li>
      <li><h2>Product B</h2>Health goth cliche seitan, helvetica vape kale chips 90's keytar mixtape deep v bushwick pour-over. Asymmetrical selfies everyday carry jean shorts trust fund church-key whatever yr kale chips lomo. Kale chips banh mi PBR&B cray. Paleo pinterest jianbing, squid forage hammock biodiesel asymmetrical man bun. Tacos everyday carry raclette brunch coloring book vaporware cornhole wolf meditation actually hot chicken franzen. Shabby chic polaroid craft beer, schlitz affogato lyft offal snackwave quinoa YOLO.</li>
      <li><h2>Product C</h2>Brooklyn disrupt viral, tbh try-hard stumptown lo-fi migas kickstarter literally farm-to-table blog. Sartorial roof party air plant farm-to-table raw denim crucifix quinoa. VHS sustainable plaid flannel, listicle unicorn locavore. Scenester pinterest subway tile, salvia irony succulents actually locavore pabst vinyl put a bird on it gochujang palo santo. Kale chips leggings cold-pressed, hexagon meh locavore flannel slow-carb meditation wolf marfa seitan. Vexillologist twee actually pug, intelligentsia meh fanny pack prism tousled food truck normcore irony tofu forage.</li>
    </ul>
  </div>
</div>
              
            
!

CSS

              
                /* Default Formatting */

body {
  text-align: center;
  padding: 2rem;
  font: 1em Helvetica Neue Light, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

p {
  text-align: left;
  margin: 0 0 1em 0;
}

h1,
h2 {
  font-weight: 100;
  color: white;
}

h2 {
  color: darkgray;
}

.container {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Fallback if no flexbox support. */
.clearfix:after {
  content: "";
  display: table;
  clear: both;
}

.column-1 {
  float: none;
  width: 100%;
  background-color: black;
}

.column-2 {
  float: left;
  width: 50%;
}

.column-3 {
  float: left;
  width: 33.333%;
}

@media only screen and (max-width: 1025px) {
  body {
    padding: 0;
  }
}

/* End Default Formatting */


/* Remove the default black disc bullet icon. */
ul {
  list-style-type: none;
}

/* Let's make the products listed left to right instead of top down. */
li {
  text-align: left;
  display: inline-block;
  padding: 3% 0;
}

/* Line up products in three columns for medium to wide displays. */
@media only screen and (min-width: 381px) {
.fusion-body .products li {
  width: 31% !important; 
  margin-left: 0 !important;
  margin-right: 2% !important; 
  float: left !important;}
}

/* Line up products in a single column for tiny displays. */
@media only screen and (max-width: 380.998px) {
.fusion-body .products li {
  width: 100% !important; 
  margin-left: 0 !important;
  margin-right: 2% !important; 
  float: left !important;}
}

/* Belay that order above. Line up products in two columns for tiny displays. */
@media only screen and (max-width: 380.998px) {
.fusion-body .products li {
  width: 45% !important; 
  margin-left: 0 !important;
  margin-right: 2% !important; 
  float: left !important;}
}


              
            
!

JS

              
                
              
            
!
999px

Console