Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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="gridcontainer">

  <div class="griditem1">
    <h2 id="responsive_headline">FLUID&nbsp;TYPE</h2>
    <hr>
    <h3 class="subtitle">It's pretty satisfying.</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>
              
            
!

CSS

              
                html {
  --font-size-sm: clamp(0.8rem, 0.17vw + 0.76rem, 0.89rem);
  --font-size-base: clamp(1rem, 0.34vw + 0.91rem, 1.19rem);
  --font-size-md: clamp(1.25rem, 0.61vw + 1.1rem, 1.58rem);
  --font-size-lg: clamp(1.56rem, 1vw + 1.31rem, 2.11rem);
  --font-size-xl: clamp(1.95rem, 1.56vw + 1.56rem, 2.81rem);
  --font-size-xxl: clamp(2.44rem, 2.38vw + 1.85rem, 3.75rem);
  --font-size-xxxl: clamp(3.05rem, 3.54vw + 2.17rem, 5rem);

  font-family: "EB Garamond", serif;
  line-height: 1.5;
  font-size: var(--font-size-base);
}

body {
  margin: 0;
  padding: 0;
  background-color: #faf8f6;
}

.gridcontainer {
  display: grid;
  margin: auto;
  max-width: 1200px;
  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%;
}
@media (max-width: 670px) {
  .gridcontainer {
    grid-template-columns: 100%;
  }
  [class*="griditem"] {
    grid-column: 1 / -1 !important;
  }
}

.griditem1 {
  grid-column: 2 / 9;
  margin: 0 auto;
  padding: 0;
  width: 100%;
  text-align: right;
}
@media (max-width: 670px) {
  .griditem1 {
    grid-template-columns: 1 / 3;
  }
}

h2 {
  margin: 0;
  font-family: system-ui;
  font-weight: 900;
  font-size: var(--font-size-xxl);
}

hr {
  margin: 0;
  padding: 0;
}

.subtitle {
  font-size: var(--font-size-md);
  margin-top: 20px;
  margin-bottom: 20px;
  font-style: italic;
  font-weight: 400;
}

.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;
  padding: 1rem;
}

p {
  max-width: 70ch;
}

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

.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: var(--font-size-sm);
  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: var(--font-size-base);
}

              
            
!

JS

              
                
              
            
!
999px

Console