cssAudio - ActiveCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatspinnerstartv

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">
  <img id="image" src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/28727/wine-jug.jpg">
  <p id="content">
  "Who would deny that when I am sipping tea in my tearoom I am swallowing the whole
  universe with it and that this very moment of my lifting the bowl to my lips is
  eternity itself transcending time and space?"
  <br><br>- D.T. Suzuki, Zen and Japanese Culture</p>


              .container {
  width: 80%;
  margin: 25px;
  margin-left: auto;
  margin-right: auto;
  color: white;
  min-width: 620px;
  max-width: 1766px;

img {
  display: block;
  float: left;
  width: 100%;
  height: auto;
  shape-outside: url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/28727/wine-jug-shape.png");
  shape-image-threshold: 0.9;
  shape-margin: 20px;

p {
  padding-top: 17%;
  padding-right: 35%;
  font-family: calibri;
  line-height: 1.3;

              function setContentFontSize() {
    document.getElementById("content").style.fontSize = (12 + Math.max(0, (document.getElementById("image").width - 620) / 55)) + "px";

var deferResizeHandler = false;

function resizeHandler() {
    if (!deferResizeHandler) {
        deferResizeHandler = true;
        window.setTimeout(function() { deferResizeHandler = false; setContentFontSize(); }, 300);

window.addEventListener("resize", resizeHandler);
window.addEventListener("load", setContentFontSize);


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 ..................