cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - 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.

            
              <link href="https://fonts.googleapis.com/css?family=EB+Garamond" rel="stylesheet">
<body>

  <div class="gridcontainer">

<div class="griditem1"><h2 id="responsive_headline">THE&nbsp;FONMON</h2><hr><h3 class="subtitle">A five column layout using columns of different widths</h3></div>
<p class="griditem2 aside">Inspired by a trip to the library of Fonmon castle, this layout is inspired by the large collection of 18th century volumes there. Designed around an asymmetric five column grid, the first and last columns are two hundred pixels wide. The centre three are ninety six pixels wide each. The gutters are thirty pixels. The centre three columns can be combined to one master column – like the one you’re now reading.</p>
<div class="griditem3 aside"> <p>Inspired by a trip to the library of Fonmon castle, this layout is inspired by the large collection of 18th century volumes there. Designed around an asymmetric five column grid, the first and last columns are two hundred pixels wide. The centre three are ninety six pixels wide each.</p></div>
<div class="griditem4">
  <p>Inspired by a trip to the library of Fonmon castle, this layout is inspired by the large collection of 18th century volumes there. Designed around an asymmetric five column grid, the first and last columns are two hundred pixels wide. The centre three are ninety six pixels wide each. The gutters are thirty pixels. The centre three columns can be combined to one master column – like the one you’re now reading. This can comfortably contain a three hundred pixel wide advertising unit.
Inspired by a trip to the library of Fonmon castle, this layout is inspired by the large collection of 18th century volumes there. Designed around an asymmetric five column grid, the first and last columns are two hundred pixels wide. The centre three are ninety six pixels wide each.</p>
<p>Asymmetric grids can give rise to interesting layouts due to combining and offsetting columns.</p>
<hr>

</div>
<div class="griditem5"><p>Inspired by a trip to the library of Fonmon castle, this layout is inspired by the large collection of 18th century volumes there. Designed around an asymmetric five column grid, the first and last columns are two hundred pixels wide. The centre three are ninety six pixels wide each. The gutters are thirty pixels. The centre three columns can be combined to one master column – like the one you’re now reading.</p></div>
<div class="griditem6">
  <p>Inspired by a trip to the library of Fonmon castle, this layout is inspired by the large collection of 18th century volumes there. Designed around an asymmetric five column grid, the first and last columns are two hundred pixels wide. The centre three are ninety six pixels wide each. The gutters are thirty pixels. The centre three columns can be combined to one master column – like the one you’re now reading. This can comfortably contain a three hundred pixel wide advertising unit.
</p>
<p>Inspired by a trip to the library of Fonmon castle, this layout is inspired by the large collection of 18th century volumes there. Designed around an asymmetric five column grid, the first and last columns are two hundred pixels wide. The centre three are ninety six pixels wide each.
</p>
</div>
<div class="griditem7 aside"><p>Inspired by a trip to the library of Fonmon castle, this layout is inspired by the large collection of 18th century volumes there. Designed around an asymmetric five column grid, the first and last columns are two hundred pixels wide.</p>
</div>

<div class="griditem8"><p>Inspired by a trip to the library of Fonmon castle, this layout is inspired by the large collection of 18th century volumes there. Designed around an asymmetric five column grid, the first and last columns are two hundred pixels wide. The centre three are ninety six pixels wide each.
Inspired by a trip to the library of Fonmon castle, this layout is inspired by the large collection of 18th century volumes there. Designed around an asymmetric five column grid, the first and last columns are two hundred pixels wide. The centre three are ninety six pixels wide each. The gutters are thirty pixels. The centre three columns can be combined to one master column – like the one you’re now reading. This can comfortably contain a three hundred pixel wide advertising unit.
</p> <p>Inspired by a trip to the library of Fonmon castle, this layout is inspired by the large collection of 18th century volumes there. Designed around an asymmetric five column grid, the first and last columns are two hundred pixels wide. The centre three are ninety six pixels wide each.
Inspired by a trip to the library of Fonmon castle, this layout is inspired by the large collection of 18th century volumes there. Designed around an asymmetric five column grid, the first and last columns are two hundred pixels wide. The centre three are ninety six pixels wide each. The gutters are thirty pixels. The centre three columns can be combined to one master column – like the one you’re now reading. This can comfortably contain a three hundred pixel wide advertising unit.
</p> </div>

<div class="griditem9 aside">
  <p>This specimen sheet is designed around an asymmetric five column grid. The first and last columns are two hundred pixels wide.
</p>
</div>
  </div>
</body>
            
          
!
            
              body {
  margin: 0;
  padding: 0;
  font-family: 'lato', helvetica, arial;
  line-height: 1.5;
  background-color: #faf8f6;
  font-family: 'EB Garamond', serif;
}



.gridcontainer {
  display: grid;
  margin: auto;
  max-width: 990px;
  margin: 0 auto;
  padding-left: 4%;
  padding-right: 4%;
  justify-content: center;
  grid-template-rows: auto;
  grid-template-columns: 25% repeat(3, 1fr 12.5925%) 1fr 25%;
}


[class^="griditem"] {}

.griditem1 {
  grid-column: 2 / 9;
  margin: 0 auto;
  padding: 0;
  width: 100%;
  text-align: right;

}

h2 {
margin: 0 auto;
  padding: 0;
font-family: helvetica;
}

hr {
  margin: 0;
  padding: 0;
}

.subtitle {
  font-size: 1.3rem;
  margin-top: 20px;
  margin-bottom: 20px;
  font-style: italic;
    font-weight: 400;
    text-align: center;
}

.griditem2 {
  grid-column: 1 / 2;
}

.griditem3 {
  grid-column: 9;
}

.griditem2 p, .griditem3 p {
  text-align: justify;
}

.griditem4 {
  grid-column: 3 / 8;
  grid-row: 2;
}

.griditem5 {
  grid-column: 1 / -1;
  background-color: black;
  color: white;
  margin-top: 20px;
  margin-bottom: 20px;
}

p {
  max-width: 70ch;
}

.griditem5 p {
  margin: auto;
  padding-top: 3%;
  padding-bottom: 5%;
}

.griditem6 {
  grid-column: 1 / 8;
}

.griditem7 {
  grid-column: 9;
}

.griditem7 p {
  background-color: rgb(225, 224, 222);
  padding: 5px 15px 10px 15px;
}

.aside, .aside p {
  color: #CD2F27;
  font-size: 1rem;
  text-align: justify;
}

.griditem8 {
  grid-column: 3 / -1;

}

.griditem8 p {
  margin: 0;
}

.griditem9 {
  grid-column: 1;
  text-align: right;
  grid-row: 5;
}

.griditem9 p {
  border-right: 1px solid gray;
  padding-right: 10px;
  text-align: right;
}

p + p {
  margin-top: 0;
  text-indent: 2em;
}

p {
  font-size: 1.2rem;
}

            
          
!
            
              /*global jQuery */
/*!
* FitText.js 1.2
*
* Copyright 2011, Dave Rupert http://daverupert.com
* Released under the WTFPL license
* http://sam.zoy.org/wtfpl/
*
* Date: Thu May 05 14:23:00 2011 -0600
*/

(function( $ ){

  $.fn.fitText = function( kompressor, options ) {

    // Setup options
    var compressor = kompressor || 1,
        settings = $.extend({
          'minFontSize' : Number.NEGATIVE_INFINITY,
          'maxFontSize' : Number.POSITIVE_INFINITY
        }, options);

    return this.each(function(){

      // Store the object
      var $this = $(this);

      // Resizer() resizes items based on the object width divided by the compressor * 10
      var resizer = function () {
        $this.css('font-size', Math.max(Math.min($this.width() / (compressor*10), parseFloat(settings.maxFontSize)), parseFloat(settings.minFontSize)));
      };

      // Call once to set.
      resizer();

      // Call on resize. Opera debounces their resize by default.
      $(window).on('resize.fittext orientationchange.fittext', resizer);

    });

  };

})( jQuery );

jQuery("#responsive_headline").fitText(.67);
            
          
!
999px
🕑 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 ..................

Console