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 CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

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="container">
    <span>Author Bio</span>

    <div class="author-bio" style="margin-bottom: 2rem;">
      <img class="author-bio__image" src="https://cdn-images-1.medium.com/max/1600/0*o3c1g40EXj65Fq9k." alt="">
      <div class="author-bio__content">
        <h2 class="author-bio__name">Adam Wathan</h2>
        <p class="author-bio__body">
          Adam is a rad dude who likes TDD, Active Record, and garlic bread with cheese. He also hosts a decent podcast and has never had a really great haircut.
    <span>Article Preview</span>

    <div class="article-preview">
      <img class="article-preview__image" src="https://i.vimeocdn.com/video/585037904_1280x720.webp" alt="">
      <div class="article-preview__content">
        <h2 class="article-preview__title">Stubbing Eloquent Relations for Faster Tests</h2>
        <p class="article-preview__body">
          In this quick blog post and screencast, I share a trick I use to speed up tests that use Eloquent relationships but don't really depend on database functionality.
              .author-bio {
  background-color: white;
  border: 1px solid hsl(0,0%,85%);
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  overflow: hidden;
.author-bio__image {
  display: block;
  width: 100%;
  height: auto;
.author-bio__content {
  padding: 1rem;
.author-bio__name {
  font-size: 1.25rem;
  color: rgba(0,0,0,0.8);
.author-bio__body {
  font-size: 1rem;
  color: rgba(0,0,0,0.75);
  line-height: 1.5;

.article-preview {
  @extend .author-bio;
.article-preview__image {
  @extend .author-bio__image;
.article-preview__content {
  @extend .author-bio__content;
.article-preview__title {
  @extend .author-bio__name;
.article-preview__body {
  @extend .author-bio__body;

body {  
  background-color: #eee;

.container {
  max-width: 740px;
  margin: 20rem auto;
  display: flex;
  justify-content: space-between;
  > div {
    flex: 0 0 350px;    

span {
  display: block;
  margin-bottom: .5em;
  font-weight: 600;
  color: rgba(0,0,0,.65)

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.


Loading ..................